Re: [PATCH] linux++, this: rename "struct notifier_block *this"

2020-06-20 Thread Linus Torvalds
On Sat, Jun 20, 2020 at 12:57 AM Alexey Dobriyan wrote: > > > If you want to build the kernel with C++, you'd be a lot better off just > > doing > > > >/* C++ braindamage */ > >#define this __this > >#define new __new > > > > and deal with that instead. > > Can't do this because of

Re: [PATCH] linux++, this: rename "struct notifier_block *this"

2020-06-20 Thread Alexey Dobriyan
On Fri, Jun 19, 2020 at 11:37:47AM -0700, Linus Torvalds wrote: > On Thu, Jun 18, 2020 at 2:06 PM Alexey Dobriyan wrote: > > > > Rename > > struct notifier_block *this > > to > > struct notifier_block *nb > > > > "nb" is arguably a better name for notifier block. > > Maybe it's a

Re: [PATCH] linux++, this: rename "struct notifier_block *this"

2020-06-19 Thread Linus Torvalds
On Thu, Jun 18, 2020 at 2:06 PM Alexey Dobriyan wrote: > > Rename > struct notifier_block *this > to > struct notifier_block *nb > > "nb" is arguably a better name for notifier block. Maybe it's a better name. But it doesn't seem worth it. Because C++ reserved words are entirely

Re: [PATCH] linux++, this: rename "struct notifier_block *this"

2020-06-19 Thread Jan Engelhardt
On Friday 2020-06-19 09:46, Christoph Hellwig wrote: >On Fri, Jun 19, 2020 at 12:06:45AM +0300, Alexey Dobriyan wrote: >> Rename >> struct notifier_block *this >> to >> struct notifier_block *nb >> >> "nb" is arguably a better name for notifier block. > >But not enough better to cause

Re: [PATCH] linux++, this: rename "struct notifier_block *this"

2020-06-19 Thread Christoph Hellwig
On Fri, Jun 19, 2020 at 12:06:45AM +0300, Alexey Dobriyan wrote: > Rename > struct notifier_block *this > to > struct notifier_block *nb > > "nb" is arguably a better name for notifier block. But not enough better to cause tons of pointless churn. Feel free to use better naming in

[PATCH] linux++, this: rename "struct notifier_block *this"

2020-06-18 Thread Alexey Dobriyan
Rename struct notifier_block *this to struct notifier_block *nb "nb" is arguably a better name for notifier block. Someone used "this" back in the days and everyone else copied. In nearly 100% of cases it is unused with notable exception of net/x25/af_ax25.c Both gcc and g++