Re: [RFC PATCH 3/4] rculist.h: Fix parentheses around macro pointer parameter use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On May 5, 2023, at 10:06 AM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> 
> On Thu, 4 May 2023 12:19:38 -0400
> Joel Fernandes <joel@xxxxxxxxxxxxxxxxx> wrote:
> 
>>>  void f(void)
>>>  {
>>>          struct test *t1;
>>>          struct test **t2 = &t1;
>>> 
>>>          list_for_each_entry_rcu((*t2), &testlist, node) {       /* works */
>>>                  //...
>>>          }
>>>          list_for_each_entry_rcu(*t2, &testlist, node) { /* broken */
>>>                  //...
>>>          }  
>> 
>> Yeah it is not clear why anyone would ever want to use it like this.
>> Why don't they just pass t1 to list_for_each_entry_rcu() ? I would
>> rather it break them and they re-think their code ;).
> 
> Remember interfaces should not be enforcing policy unless it's key to the
> way the interface works.

Oh yeah, 100% agree. I am not particularly against this particular patch but I also dont see it as solving any problem. Feel free to Ack the patch if you feel strongly about wanting it.

 - Joel


> 
> -- Steve




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux