In preparation to limit the scope of a list iterator to the list
traversal loop, use a dedicated pointer to point to the found element [1].
Before, the code implicitly used the head when no element was found
when using &pos->list. Since the new variable is only set if an
element was found, the lis
On Thu, 7 Apr 2022 12:28:47 +0200 Jakob Koschel wrote:
> diff --git a/drivers/net/dsa/sja1105/sja1105_vl.c
> b/drivers/net/dsa/sja1105/sja1105_vl.c
> index b7e95d60a6e4..cfcae4d19eef 100644
> --- a/drivers/net/dsa/sja1105/sja1105_vl.c
> +++ b/drivers/net/dsa/sja1105/sja1105_vl.c
> @@ -27,20 +27,2
Le 07/04/2022 à 12:28, Jakob Koschel a écrit :
> In preparation to limit the scope of a list iterator to the list
> traversal loop, use a dedicated pointer to point to the found element [1].
>
> Before, the code implicitly used the head when no element was found
> when using &pos->list. Since th
Hello Jakob,
On Thu, Apr 07, 2022 at 12:28:47PM +0200, Jakob Koschel wrote:
> In preparation to limit the scope of a list iterator to the list
> traversal loop, use a dedicated pointer to point to the found element [1].
>
> Before, the code implicitly used the head when no element was found
> whe
Hey Christophe,
> On 8. Apr 2022, at 09:47, Christophe Leroy
> wrote:
>
>
>
> Le 07/04/2022 à 12:28, Jakob Koschel a écrit :
>> In preparation to limit the scope of a list iterator to the list
>> traversal loop, use a dedicated pointer to point to the found element [1].
>>
>> Before, the cod
Hello Vladimir,
> On 8. Apr 2022, at 13:41, Vladimir Oltean wrote:
>
> Hello Jakob,
>
> On Thu, Apr 07, 2022 at 12:28:47PM +0200, Jakob Koschel wrote:
>> In preparation to limit the scope of a list iterator to the list
>> traversal loop, use a dedicated pointer to point to the found element [1]
Hello Jakub,
> On 8. Apr 2022, at 05:54, Jakub Kicinski wrote:
>
> On Thu, 7 Apr 2022 12:28:47 +0200 Jakob Koschel wrote:
>> diff --git a/drivers/net/dsa/sja1105/sja1105_vl.c
>> b/drivers/net/dsa/sja1105/sja1105_vl.c
>> index b7e95d60a6e4..cfcae4d19eef 100644
>> --- a/drivers/net/dsa/sja1105/s
On Sat, 9 Apr 2022 01:58:29 +0200 Jakob Koschel wrote:
> > This turns a pretty slick piece of code into something ugly :(
> > I'd rather you open coded the iteration here than make it more
> > complex to satisfy "safe coding guidelines".
>
> I'm not entirely sure I understand what you mean with
On Sat, Apr 09, 2022 at 01:58:29AM +0200, Jakob Koschel wrote:
> Hello Jakub,
> > Also the list_add() could be converted to list_add_tail().
>
> Good point, I wasn't sure if that's considered as something that should be
> done as a separate change. I'm happy to include it in v2.
By now you probab
Hey Vladimir,
> On 9. Apr 2022, at 01:54, Jakob Koschel wrote:
>
> Hello Vladimir,
>
>> On 8. Apr 2022, at 13:41, Vladimir Oltean wrote:
>>
>> Hello Jakob,
>>
>> On Thu, Apr 07, 2022 at 12:28:47PM +0200, Jakob Koschel wrote:
>>> In preparation to limit the scope of a list iterator to the lis
On Sun, Apr 10, 2022 at 12:51:56PM +0200, Jakob Koschel wrote:
> I've just looked at this again in a bit more detail while integrating it into
> the patch series.
>
> I realized that this just shifts the 'problem' to using the 'pos' iterator
> variable after the loop.
> If the scope of the list
> On 10. Apr 2022, at 13:05, Vladimir Oltean wrote:
>
> On Sun, Apr 10, 2022 at 12:51:56PM +0200, Jakob Koschel wrote:
>> I've just looked at this again in a bit more detail while integrating it
>> into the patch series.
>>
>> I realized that this just shifts the 'problem' to using the 'pos'
> On 10. Apr 2022, at 14:39, Jakob Koschel wrote:
>
>
>
>> On 10. Apr 2022, at 13:05, Vladimir Oltean wrote:
>>
>> On Sun, Apr 10, 2022 at 12:51:56PM +0200, Jakob Koschel wrote:
>>> I've just looked at this again in a bit more detail while integrating it
>>> into the patch series.
>>>
>>
On Sun, Apr 10, 2022 at 08:24:37PM +0200, Jakob Koschel wrote:
> Btw, I just realized that the if (!pos) is not necessary. This should simply
> do it:
>
> diff --git a/drivers/net/dsa/sja1105/sja1105_vl.c
> b/drivers/net/dsa/sja1105/sja1105_vl.c
> index b7e95d60a6e4..2d59e75a9e3d 100644
> --- a/
> On 10. Apr 2022, at 22:02, Vladimir Oltean wrote:
>
> On Sun, Apr 10, 2022 at 08:24:37PM +0200, Jakob Koschel wrote:
>> Btw, I just realized that the if (!pos) is not necessary. This should simply
>> do it:
>>
>> diff --git a/drivers/net/dsa/sja1105/sja1105_vl.c
>> b/drivers/net/dsa/sja11
On Sun, Apr 10, 2022 at 10:30:31PM +0200, Jakob Koschel wrote:
> > On 10. Apr 2022, at 22:02, Vladimir Oltean wrote:
> >
> > On Sun, Apr 10, 2022 at 08:24:37PM +0200, Jakob Koschel wrote:
> >> Btw, I just realized that the if (!pos) is not necessary. This should
> >> simply do it:
> >>
> >> dif
16 matches
Mail list logo