> On 3. Mar 2022, at 05:58, David Laight wrote:
>
> From: Xiaomeng Tong
>> Sent: 03 March 2022 02:27
>>
>> On Wed, 2 Mar 2022 14:04:06 +, David Laight
>> wrote:
>>> I think that it would be better to make any alternate loop macro
>>> just set the variable to NULL on the loop exit.
>>> Th
> On 1. Mar 2022, at 18:36, Greg KH wrote:
>
> On Tue, Mar 01, 2022 at 12:28:15PM +0100, Jakob Koschel wrote:
>>
>>
>>> On 1. Mar 2022, at 01:41, Linus Torvalds
>>> wrote:
>>>
>>> On Mon, Feb 28, 2022 at 1:47 PM Jakob Koschel
> On 1. Mar 2022, at 01:41, Linus Torvalds
> wrote:
>
> On Mon, Feb 28, 2022 at 1:47 PM Jakob Koschel wrote:
>>
>> The goal of this is to get compiler warnings right? This would indeed be
>> great.
>
> Yes, so I don't mind having a one-time
> On 28. Feb 2022, at 21:10, Linus Torvalds
> wrote:
>
> On Mon, Feb 28, 2022 at 12:03 PM Linus Torvalds
> wrote:
>>
>> Side note: we do need *some* way to do it.
>
> Ooh.
>
> This patch is a work of art.
>
> And I mean that in the worst possible way.
>
> We can do
>
>typeof(po
> On 28. Feb 2022, at 21:56, Christian König wrote:
>
>
>
> Am 28.02.22 um 21:42 schrieb James Bottomley:
>> On Mon, 2022-02-28 at 21:07 +0100, Christian König wrote:
>>> Am 28.02.22 um 20:56 schrieb Linus Torvalds:
On Mon, Feb 28, 2022 at 4:19 AM Christian König
wrote:
[SNIP
rated
by similar use cases.
Because the output of get_maintainer.pl was too big,
I included all the found lists and everyone from the
previous discussion.
Jakob Koschel (6):
drivers: usb: remove usage of list iterator past the loop body
treewide: remove using list iterator after loop body as a
> On 28. Feb 2022, at 12:20, Greg KH wrote:
>
> On Mon, Feb 28, 2022 at 12:08:18PM +0100, Jakob Koschel wrote:
>> If the list does not contain the expected element, the value of
>> list_for_each_entry() iterator will not point to a valid structure.
>> To avoid type
> On 28. Feb 2022, at 12:24, Dan Carpenter wrote:
>
> On Mon, Feb 28, 2022 at 12:08:17PM +0100, Jakob Koschel wrote:
>> diff --git a/drivers/usb/gadget/udc/at91_udc.c
>> b/drivers/usb/gadget/udc/at91_udc.c
>> index 9040a0561466..0fd0307bc07b 100644
>> --- a/
loop
and only setting the original variable if a suitable element was found.
Then determing if the element was found is simply checking if the
variable is set.
Signed-off-by: Jakob Koschel
---
drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c | 11 +++
drivers/scsi/wd719x.c
the list traversal
loop, use a dedicated pointer to point to the found element.
Determining if an element was found is then simply checking if
the pointer is != NULL.
Signed-off-by: Jakob Koschel
---
arch/x86/kernel/cpu/sgx/encl.c | 6 +++--
drivers/scsi/scsi_transport_sas.c| 17
the break, it is set to the correct value and leaving it
NULL if no element was found.
Signed-off-by: Jakob Koschel
---
arch/powerpc/sysdev/fsl_gtm.c| 4 ++--
drivers/media/pci/saa7134/saa7134-alsa.c | 4 ++--
drivers/perf/xgene_pmu.c | 13 +++--
3 files
limiting scope of a list iterator to the list traversal
loop, use a dedicated pointer to point to the found request object.
Signed-off-by: Jakob Koschel
---
drivers/usb/gadget/udc/aspeed-vhub/epn.c | 11 ++
drivers/usb/gadget/udc/at91_udc.c| 26 ++--
drivers/usb
list_entry_is_head() or
&pos->member == head, using the iterator variable after the loop should
be avoided.
In preparation to limiting the scope of a list iterator to the list
traversal loop, use a dedicated pointer to point to the found element.
Signed-off-by: Jakob Koschel
---
arch/arm/mach-mmp
When list_for_each_entry() completes the iteration over the whole list
without breaking the loop, the iterator value will *always* be a bogus
pointer computed based on the head element.
To avoid type confusion use the actual list head directly instead of last
iterator value.
Signed-off-by: Jakob
14 matches
Mail list logo