* [PATCH] remove untouched code in kfifo_in
@ 2012-10-18 13:59 Wei Yang
2012-10-18 22:37 ` richard -rw- weinberger
0 siblings, 1 reply; 14+ messages in thread
From: Wei Yang @ 2012-10-18 13:59 UTC (permalink / raw)
To: linux-kernel, stefani, jkosina; +Cc: Wei Yang
In kfifo_in marco, one piece of code is arounded by if(0). This code in
introduced by Stefani Seibold <stefani@seibold.net> to suppress a compiler
warning. This warning is not there with the upgrade of gcc version.
This patch just remove this code.
---
include/linux/kfifo.h | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
index 10308c6..e7015bb 100644
--- a/include/linux/kfifo.h
+++ b/include/linux/kfifo.h
@@ -512,10 +512,6 @@ __kfifo_uint_must_check_helper( \
unsigned long __n = (n); \
const size_t __recsize = sizeof(*__tmp->rectype); \
struct __kfifo *__kfifo = &__tmp->kfifo; \
- if (0) { \
- typeof(__tmp->ptr_const) __dummy __attribute__ ((unused)); \
- __dummy = (typeof(__buf))NULL; \
- } \
(__recsize) ?\
__kfifo_in_r(__kfifo, __buf, __n, __recsize) : \
__kfifo_in(__kfifo, __buf, __n); \
--
1.7.5.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] remove untouched code in kfifo_in
2012-10-18 13:59 [PATCH] remove untouched code in kfifo_in Wei Yang
@ 2012-10-18 22:37 ` richard -rw- weinberger
2012-10-19 5:23 ` Stefani Seibold
0 siblings, 1 reply; 14+ messages in thread
From: richard -rw- weinberger @ 2012-10-18 22:37 UTC (permalink / raw)
To: Wei Yang; +Cc: linux-kernel, stefani, jkosina
On Thu, Oct 18, 2012 at 3:59 PM, Wei Yang <weiyang@linux.vnet.ibm.com> wrote:
> In kfifo_in marco, one piece of code is arounded by if(0). This code in
> introduced by Stefani Seibold <stefani@seibold.net> to suppress a compiler
> warning. This warning is not there with the upgrade of gcc version.
>
> This patch just remove this code.
Are you sure?
This code fragment looks like a compiler bomb to detect type mismatch to me...
--
Thanks,
//richard
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] remove untouched code in kfifo_in
2012-10-18 22:37 ` richard -rw- weinberger
@ 2012-10-19 5:23 ` Stefani Seibold
2012-10-19 7:34 ` Jiri Kosina
[not found] ` <5080f0b3.85712b0a.0d0f.ffff9dd2SMTPIN_ADDED@mx.google.com>
0 siblings, 2 replies; 14+ messages in thread
From: Stefani Seibold @ 2012-10-19 5:23 UTC (permalink / raw)
To: richard -rw- weinberger; +Cc: Wei Yang, linux-kernel, jkosina
Am Freitag, den 19.10.2012, 00:37 +0200 schrieb richard -rw- weinberger:
> On Thu, Oct 18, 2012 at 3:59 PM, Wei Yang <weiyang@linux.vnet.ibm.com> wrote:
> > In kfifo_in marco, one piece of code is arounded by if(0). This code in
> > introduced by Stefani Seibold <stefani@seibold.net> to suppress a compiler
> > warning. This warning is not there with the upgrade of gcc version.
> >
> > This patch just remove this code.
>
> Are you sure?
> This code fragment looks like a compiler bomb to detect type mismatch to me...
>
Yes, you are great! That was the reason why i made this peace of code.
So don't remove it!
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] remove untouched code in kfifo_in
2012-10-19 5:23 ` Stefani Seibold
@ 2012-10-19 7:34 ` Jiri Kosina
2012-10-22 23:56 ` Andrew Morton
[not found] ` <5080f0b3.85712b0a.0d0f.ffff9dd2SMTPIN_ADDED@mx.google.com>
1 sibling, 1 reply; 14+ messages in thread
From: Jiri Kosina @ 2012-10-19 7:34 UTC (permalink / raw)
To: Stefani Seibold; +Cc: richard -rw- weinberger, Wei Yang, linux-kernel
On Fri, 19 Oct 2012, Stefani Seibold wrote:
> > > In kfifo_in marco, one piece of code is arounded by if(0). This code in
> > > introduced by Stefani Seibold <stefani@seibold.net> to suppress a compiler
> > > warning. This warning is not there with the upgrade of gcc version.
> > >
> > > This patch just remove this code.
> >
> > Are you sure?
> > This code fragment looks like a compiler bomb to detect type mismatch to me...
>
> Yes, you are great! That was the reason why i made this peace of code.
> So don't remove it!
As even you, the author of the code, got confused by it for a while,
adding an explanatory comment seems appropriate.
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] remove untouched code in kfifo_in
[not found] ` <5080f0b3.85712b0a.0d0f.ffff9dd2SMTPIN_ADDED@mx.google.com>
@ 2012-10-19 8:14 ` richard -rw- weinberger
[not found] ` <50810e61.688c320a.1baa.6cacSMTPIN_ADDED@mx.google.com>
0 siblings, 1 reply; 14+ messages in thread
From: richard -rw- weinberger @ 2012-10-19 8:14 UTC (permalink / raw)
To: Richard Yang; +Cc: Stefani Seibold, linux-kernel, jkosina
On Fri, Oct 19, 2012 at 8:18 AM, Richard Yang
<weiyang@linux.vnet.ibm.com> wrote:
> On Fri, Oct 19, 2012 at 07:23:09AM +0200, Stefani Seibold wrote:
>>
>>Am Freitag, den 19.10.2012, 00:37 +0200 schrieb richard -rw- weinberger:
>>> On Thu, Oct 18, 2012 at 3:59 PM, Wei Yang <weiyang@linux.vnet.ibm.com> wrote:
>>> > In kfifo_in marco, one piece of code is arounded by if(0). This code in
>>> > introduced by Stefani Seibold <stefani@seibold.net> to suppress a compiler
>>> > warning. This warning is not there with the upgrade of gcc version.
>>> >
>>> > This patch just remove this code.
>>>
>>> Are you sure?
>>> This code fragment looks like a compiler bomb to detect type mismatch to me...
>>>
>>
>>Yes, you are great! That was the reason why i made this peace of code.
>>So don't remove it!
> Thanks for your confirmation.
>
> Hmm, would you give me a hint on how it check the type mismatch?
Here a small hint:
---cut---
struct x {
};
struct y {
};
#define check(a, b) \
({ \
if (0) { \
typeof(a) __dummy __attribute__ ((unused)); \
__dummy = (typeof(b))NULL; \
} \
})
int main(int argc, char **argv)
{
struct x _x;
struct y _y;
check(&_x, &_x); //okay
check(&_x, &_y); //will explode with "assignment from
incompatible pointer type"
return 0;
}
---cut---
--
Thanks,
//richard
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] remove untouched code in kfifo_in
[not found] ` <50810e61.688c320a.1baa.6cacSMTPIN_ADDED@mx.google.com>
@ 2012-10-19 8:28 ` richard -rw- weinberger
0 siblings, 0 replies; 14+ messages in thread
From: richard -rw- weinberger @ 2012-10-19 8:28 UTC (permalink / raw)
To: Richard Yang; +Cc: Stefani Seibold, linux-kernel, jkosina
On Fri, Oct 19, 2012 at 10:24 AM, Richard Yang
<weiyang@linux.vnet.ibm.com> wrote:
> got it, thanks~
BTW: The surrounding if (0) {} block could be removed in future.
I'm sure Stefani added it to suppress a compiler warning.
But the typeof() magic has to stay...
--
Thanks,
//richard
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] remove untouched code in kfifo_in
2012-10-19 7:34 ` Jiri Kosina
@ 2012-10-22 23:56 ` Andrew Morton
[not found] ` <508600ba.a7fe440a.4c19.fffff64bSMTPIN_ADDED@mx.google.com>
0 siblings, 1 reply; 14+ messages in thread
From: Andrew Morton @ 2012-10-22 23:56 UTC (permalink / raw)
To: Jiri Kosina
Cc: Stefani Seibold, richard -rw- weinberger, Wei Yang, linux-kernel
On Fri, 19 Oct 2012 09:34:43 +0200 (CEST)
Jiri Kosina <jkosina@suse.cz> wrote:
> On Fri, 19 Oct 2012, Stefani Seibold wrote:
>
> > > > In kfifo_in marco, one piece of code is arounded by if(0). This code in
> > > > introduced by Stefani Seibold <stefani@seibold.net> to suppress a compiler
> > > > warning. This warning is not there with the upgrade of gcc version.
> > > >
> > > > This patch just remove this code.
> > >
> > > Are you sure?
> > > This code fragment looks like a compiler bomb to detect type mismatch to me...
> >
> > Yes, you are great! That was the reason why i made this peace of code.
> > So don't remove it!
>
> As even you, the author of the code, got confused by it for a while,
> adding an explanatory comment seems appropriate.
>
include/linux/typecheck.h?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] remove untouched code in kfifo_in
[not found] ` <508600ba.a7fe440a.4c19.fffff64bSMTPIN_ADDED@mx.google.com>
@ 2012-10-23 19:25 ` richard -rw- weinberger
2012-10-23 19:39 ` Andrew Morton
0 siblings, 1 reply; 14+ messages in thread
From: richard -rw- weinberger @ 2012-10-23 19:25 UTC (permalink / raw)
To: Richard Yang; +Cc: Andrew Morton, Jiri Kosina, Stefani Seibold, linux-kernel
On Tue, Oct 23, 2012 at 4:27 AM, Richard Yang
<weiyang@linux.vnet.ibm.com> wrote:
> On Mon, Oct 22, 2012 at 04:56:02PM -0700, Andrew Morton wrote:
>>On Fri, 19 Oct 2012 09:34:43 +0200 (CEST)
>>Jiri Kosina <jkosina@suse.cz> wrote:
>>
>>> On Fri, 19 Oct 2012, Stefani Seibold wrote:
>>>
>>> > > > In kfifo_in marco, one piece of code is arounded by if(0). This code in
>>> > > > introduced by Stefani Seibold <stefani@seibold.net> to suppress a compiler
>>> > > > warning. This warning is not there with the upgrade of gcc version.
>>> > > >
>>> > > > This patch just remove this code.
>>> > >
>>> > > Are you sure?
>>> > > This code fragment looks like a compiler bomb to detect type mismatch to me...
>>> >
>>> > Yes, you are great! That was the reason why i made this peace of code.
>>> > So don't remove it!
>>>
>>> As even you, the author of the code, got confused by it for a while,
>>> adding an explanatory comment seems appropriate.
>>>
>>
>>include/linux/typecheck.h?
>
> Something like this?
>
> From f20c316bf87d5db0816a01705b7869526c0b2363 Mon Sep 17 00:00:00 2001
> From: Wei Yang <weiyang@linux.vnet.ibm.com>
> Date: Wed, 17 Oct 2012 16:45:49 +0800
> Subject: [PATCH] Replace the type check code with typecheck() in kfifo_in
>
> In kfifo_in marco, one piece of code which is arounded by if(0) will check the
> type of __tmp->ptr_const and __buf. If they are different type, there will
> output a warning during compiling. This piece of code is not self explaining
> and a little bit hard to understand.
>
> Based on Andrew Morton's suggestion, this patch replace this with typecheck()
> which will be easy to understand.
> ---
> include/linux/kfifo.h | 5 +----
> 1 files changed, 1 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
> index 10308c6..b48fe71 100644
> --- a/include/linux/kfifo.h
> +++ b/include/linux/kfifo.h
> @@ -512,10 +512,7 @@ __kfifo_uint_must_check_helper( \
> unsigned long __n = (n); \
> const size_t __recsize = sizeof(*__tmp->rectype); \
> struct __kfifo *__kfifo = &__tmp->kfifo; \
> - if (0) { \
> - typeof(__tmp->ptr_const) __dummy __attribute__ ((unused)); \
> - __dummy = (typeof(__buf))NULL; \
> - } \
> + typecheck(typeof(__tmp->ptr_const), __buf);\
> (__recsize) ?\
> __kfifo_in_r(__kfifo, __buf, __n, __recsize) : \
> __kfifo_in(__kfifo, __buf, __n); \
What about all the other open coded type checks in that file?
--
Thanks,
//richard
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] remove untouched code in kfifo_in
2012-10-23 19:25 ` richard -rw- weinberger
@ 2012-10-23 19:39 ` Andrew Morton
0 siblings, 0 replies; 14+ messages in thread
From: Andrew Morton @ 2012-10-23 19:39 UTC (permalink / raw)
To: richard -rw- weinberger
Cc: Richard Yang, Jiri Kosina, Stefani Seibold, linux-kernel
On Tue, 23 Oct 2012 21:25:46 +0200
richard -rw- weinberger <richard.weinberger@gmail.com> wrote:
> > Subject: [PATCH] Replace the type check code with typecheck() in kfifo_in
> >
> > In kfifo_in marco, one piece of code which is arounded by if(0) will check the
> > type of __tmp->ptr_const and __buf. If they are different type, there will
> > output a warning during compiling. This piece of code is not self explaining
> > and a little bit hard to understand.
> >
> > Based on Andrew Morton's suggestion, this patch replace this with typecheck()
> > which will be easy to understand.
> > ---
> > include/linux/kfifo.h | 5 +----
> > 1 files changed, 1 insertions(+), 4 deletions(-)
> >
> > diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
> > index 10308c6..b48fe71 100644
> > --- a/include/linux/kfifo.h
> > +++ b/include/linux/kfifo.h
> > @@ -512,10 +512,7 @@ __kfifo_uint_must_check_helper( \
> > unsigned long __n = (n); \
> > const size_t __recsize = sizeof(*__tmp->rectype); \
> > struct __kfifo *__kfifo = &__tmp->kfifo; \
> > - if (0) { \
> > - typeof(__tmp->ptr_const) __dummy __attribute__ ((unused)); \
> > - __dummy = (typeof(__buf))NULL; \
> > - } \
> > + typecheck(typeof(__tmp->ptr_const), __buf);\
> > (__recsize) ?\
> > __kfifo_in_r(__kfifo, __buf, __n, __recsize) : \
> > __kfifo_in(__kfifo, __buf, __n); \
>
> What about all the other open coded type checks in that file?
Yes, there are a lot. Searching for "if (0)" finds them.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] remove untouched code in kfifo_in
2012-10-18 5:34 ` Stefani Seibold
@ 2012-10-18 7:00 ` Jiri Kosina
0 siblings, 0 replies; 14+ messages in thread
From: Jiri Kosina @ 2012-10-18 7:00 UTC (permalink / raw)
To: Stefani Seibold; +Cc: Richard Yang, linux-kernel
On Thu, 18 Oct 2012, Stefani Seibold wrote:
> > >This was introduce by me to suppress a compiler warning, so don't remove
> > >it.
> > Which warning? I compile by removing this, but not find warning.
> > I compile it on x86_64 platform.
> > >
>
> Sorry, i can't remember, it is three years and two gcc major releases
> ago.
Well, exactly. gcc that needs this workaround seems to be pretty broken,
and I am not seeing any warnings either myself.
As it's quite a obscure and confusing construction, I'd not hesitate
removing that.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] remove untouched code in kfifo_in
[not found] ` <20121018015959.GD4511@richard.(null)>
@ 2012-10-18 5:34 ` Stefani Seibold
2012-10-18 7:00 ` Jiri Kosina
0 siblings, 1 reply; 14+ messages in thread
From: Stefani Seibold @ 2012-10-18 5:34 UTC (permalink / raw)
To: Richard Yang; +Cc: Jiri Kosina, linux-kernel
Am Donnerstag, den 18.10.2012, 09:59 +0800 schrieb Richard Yang:
> On Wed, Oct 17, 2012 at 09:51:49PM +0200, Stefani Seibold wrote:
> >This was introduce by me to suppress a compiler warning, so don't remove
> >it.
> Which warning? I compile by removing this, but not find warning.
> I compile it on x86_64 platform.
> >
Sorry, i can't remember, it is three years and two gcc major releases
ago.
> >Am Mittwoch, den 17.10.2012, 16:05 +0200 schrieb Jiri Kosina:
> >> On Wed, 17 Oct 2012, Richard Yang wrote:
> >>
> >> > >> This patch just remove this code.
> >> > >> ---
> >> > >> include/linux/kfifo.h | 4 ----
> >> > >> 1 files changed, 0 insertions(+), 4 deletions(-)
> >> > >>
> >> > >> diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
> >> > >> index 10308c6..e7015bb 100644
> >> > >> --- a/include/linux/kfifo.h
> >> > >> +++ b/include/linux/kfifo.h
> >> > >> @@ -512,10 +512,6 @@ __kfifo_uint_must_check_helper( \
> >> > >> unsigned long __n = (n); \
> >> > >> const size_t __recsize = sizeof(*__tmp->rectype); \
> >> > >> struct __kfifo *__kfifo = &__tmp->kfifo; \
> >> > >> - if (0) { \
> >> > >> - typeof(__tmp->ptr_const) __dummy __attribute__ ((unused)); \
> >> > >> - __dummy = (typeof(__buf))NULL; \
> >> > >> - } \
> >> > >> (__recsize) ?\
> >> > >> __kfifo_in_r(__kfifo, __buf, __n, __recsize) : \
> >> > >> __kfifo_in(__kfifo, __buf, __n); \
> >> > >
> >> > >Frankly, I'd first like to understand what was the rationale for adding it
> >> > >at the first place. Adding Stefani and lkml to CC.
> >> >
> >> > Agree.
> >> >
> >> > BTW, by git blame, I just see commit 2e956fb3 which is checked in by Stefani.
> >> > While looking in the diff, the kfifo_in() is already there. Looks like this
> >> > commit move the definition from one file to another file.
> >> >
> >> > So I am not sure the if(0) code is added by Stefani. Any other method to trace
> >> > the ealier history?
> >>
> >> git blame -- include/linux/kfifo-new.h 2e956fb3~1
> >>
> >
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] remove untouched code in kfifo_in
2012-10-17 14:05 ` Jiri Kosina
@ 2012-10-17 19:51 ` Stefani Seibold
[not found] ` <20121018015959.GD4511@richard.(null)>
0 siblings, 1 reply; 14+ messages in thread
From: Stefani Seibold @ 2012-10-17 19:51 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Richard Yang, linux-kernel
This was introduce by me to suppress a compiler warning, so don't remove
it.
Am Mittwoch, den 17.10.2012, 16:05 +0200 schrieb Jiri Kosina:
> On Wed, 17 Oct 2012, Richard Yang wrote:
>
> > >> This patch just remove this code.
> > >> ---
> > >> include/linux/kfifo.h | 4 ----
> > >> 1 files changed, 0 insertions(+), 4 deletions(-)
> > >>
> > >> diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
> > >> index 10308c6..e7015bb 100644
> > >> --- a/include/linux/kfifo.h
> > >> +++ b/include/linux/kfifo.h
> > >> @@ -512,10 +512,6 @@ __kfifo_uint_must_check_helper( \
> > >> unsigned long __n = (n); \
> > >> const size_t __recsize = sizeof(*__tmp->rectype); \
> > >> struct __kfifo *__kfifo = &__tmp->kfifo; \
> > >> - if (0) { \
> > >> - typeof(__tmp->ptr_const) __dummy __attribute__ ((unused)); \
> > >> - __dummy = (typeof(__buf))NULL; \
> > >> - } \
> > >> (__recsize) ?\
> > >> __kfifo_in_r(__kfifo, __buf, __n, __recsize) : \
> > >> __kfifo_in(__kfifo, __buf, __n); \
> > >
> > >Frankly, I'd first like to understand what was the rationale for adding it
> > >at the first place. Adding Stefani and lkml to CC.
> >
> > Agree.
> >
> > BTW, by git blame, I just see commit 2e956fb3 which is checked in by Stefani.
> > While looking in the diff, the kfifo_in() is already there. Looks like this
> > commit move the definition from one file to another file.
> >
> > So I am not sure the if(0) code is added by Stefani. Any other method to trace
> > the ealier history?
>
> git blame -- include/linux/kfifo-new.h 2e956fb3~1
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] remove untouched code in kfifo_in
[not found] ` <20121017140136.GA7913@richard.(null)>
@ 2012-10-17 14:05 ` Jiri Kosina
2012-10-17 19:51 ` Stefani Seibold
0 siblings, 1 reply; 14+ messages in thread
From: Jiri Kosina @ 2012-10-17 14:05 UTC (permalink / raw)
To: Richard Yang; +Cc: Stefani Seibold, linux-kernel
On Wed, 17 Oct 2012, Richard Yang wrote:
> >> This patch just remove this code.
> >> ---
> >> include/linux/kfifo.h | 4 ----
> >> 1 files changed, 0 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
> >> index 10308c6..e7015bb 100644
> >> --- a/include/linux/kfifo.h
> >> +++ b/include/linux/kfifo.h
> >> @@ -512,10 +512,6 @@ __kfifo_uint_must_check_helper( \
> >> unsigned long __n = (n); \
> >> const size_t __recsize = sizeof(*__tmp->rectype); \
> >> struct __kfifo *__kfifo = &__tmp->kfifo; \
> >> - if (0) { \
> >> - typeof(__tmp->ptr_const) __dummy __attribute__ ((unused)); \
> >> - __dummy = (typeof(__buf))NULL; \
> >> - } \
> >> (__recsize) ?\
> >> __kfifo_in_r(__kfifo, __buf, __n, __recsize) : \
> >> __kfifo_in(__kfifo, __buf, __n); \
> >
> >Frankly, I'd first like to understand what was the rationale for adding it
> >at the first place. Adding Stefani and lkml to CC.
>
> Agree.
>
> BTW, by git blame, I just see commit 2e956fb3 which is checked in by Stefani.
> While looking in the diff, the kfifo_in() is already there. Looks like this
> commit move the definition from one file to another file.
>
> So I am not sure the if(0) code is added by Stefani. Any other method to trace
> the ealier history?
git blame -- include/linux/kfifo-new.h 2e956fb3~1
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] remove untouched code in kfifo_in
[not found] <1350463837-30244-1-git-send-email-weiyang@linux.vnet.ibm.com>
@ 2012-10-17 12:37 ` Jiri Kosina
[not found] ` <20121017140136.GA7913@richard.(null)>
0 siblings, 1 reply; 14+ messages in thread
From: Jiri Kosina @ 2012-10-17 12:37 UTC (permalink / raw)
To: Wei Yang; +Cc: Stefani Seibold, linux-kernel
On Wed, 17 Oct 2012, Wei Yang wrote:
> In kfifo_in marco, one piece of code is arounded by if(0).
>
> This patch just remove this code.
> ---
> include/linux/kfifo.h | 4 ----
> 1 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
> index 10308c6..e7015bb 100644
> --- a/include/linux/kfifo.h
> +++ b/include/linux/kfifo.h
> @@ -512,10 +512,6 @@ __kfifo_uint_must_check_helper( \
> unsigned long __n = (n); \
> const size_t __recsize = sizeof(*__tmp->rectype); \
> struct __kfifo *__kfifo = &__tmp->kfifo; \
> - if (0) { \
> - typeof(__tmp->ptr_const) __dummy __attribute__ ((unused)); \
> - __dummy = (typeof(__buf))NULL; \
> - } \
> (__recsize) ?\
> __kfifo_in_r(__kfifo, __buf, __n, __recsize) : \
> __kfifo_in(__kfifo, __buf, __n); \
Frankly, I'd first like to understand what was the rationale for adding it
at the first place. Adding Stefani and lkml to CC.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2012-10-23 19:39 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-18 13:59 [PATCH] remove untouched code in kfifo_in Wei Yang
2012-10-18 22:37 ` richard -rw- weinberger
2012-10-19 5:23 ` Stefani Seibold
2012-10-19 7:34 ` Jiri Kosina
2012-10-22 23:56 ` Andrew Morton
[not found] ` <508600ba.a7fe440a.4c19.fffff64bSMTPIN_ADDED@mx.google.com>
2012-10-23 19:25 ` richard -rw- weinberger
2012-10-23 19:39 ` Andrew Morton
[not found] ` <5080f0b3.85712b0a.0d0f.ffff9dd2SMTPIN_ADDED@mx.google.com>
2012-10-19 8:14 ` richard -rw- weinberger
[not found] ` <50810e61.688c320a.1baa.6cacSMTPIN_ADDED@mx.google.com>
2012-10-19 8:28 ` richard -rw- weinberger
[not found] <1350463837-30244-1-git-send-email-weiyang@linux.vnet.ibm.com>
2012-10-17 12:37 ` Jiri Kosina
[not found] ` <20121017140136.GA7913@richard.(null)>
2012-10-17 14:05 ` Jiri Kosina
2012-10-17 19:51 ` Stefani Seibold
[not found] ` <20121018015959.GD4511@richard.(null)>
2012-10-18 5:34 ` Stefani Seibold
2012-10-18 7:00 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).