linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ssb: main.c: This patch removes unnecessary return statement using spatch tool
@ 2017-01-06 15:20 Rahul Krishnan
  2017-01-06 22:39 ` Rafał Miłecki
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Rahul Krishnan @ 2017-01-06 15:20 UTC (permalink / raw)
  To: m; +Cc: linux-wireless, linux-kernel

This patch removes unnecessary return statement using spatch.
Signed-off-by: Rahul Krishnan <mrahul.krishnan@gmail.com>
---
 drivers/ssb/main.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index d1a7507..ae3b7fe 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -1,4 +1,4 @@
-/*
+ patch /home/rahul/git/kernels/staging/drivers//*
  * Sonics Silicon Backplane
  * Subsystem core
  *
@@ -1272,9 +1272,7 @@ u32 ssb_admatch_size(u32 adm)
 	default:
 		SSB_WARN_ON(1);
 	}
-	size = (1 << (size + 1));
-
-	return size;
+	return (1 << (size + 1));
 }
 EXPORT_SYMBOL(ssb_admatch_size);
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] ssb: main.c: This patch removes unnecessary return statement using spatch tool
  2017-01-06 15:20 [PATCH] ssb: main.c: This patch removes unnecessary return statement using spatch tool Rahul Krishnan
@ 2017-01-06 22:39 ` Rafał Miłecki
  2017-01-06 22:40   ` Rafał Miłecki
  2017-01-06 22:46   ` Michael Büsch
  2017-01-07  0:52 ` Julian Calaby
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 7+ messages in thread
From: Rafał Miłecki @ 2017-01-06 22:39 UTC (permalink / raw)
  To: Rahul Krishnan
  Cc: Michael Büsch, linux-wireless@vger.kernel.org,
	Linux Kernel Mailing List

Hi Rahul,

On 6 January 2017 at 16:20, Rahul Krishnan <mrahul.krishnan@gmail.com> wrot=
e:
> This patch removes unnecessary return statement using spatch.
> Signed-off-by: Rahul Krishnan <mrahul.krishnan@gmail.com>

Please work on simplifying & making topic more accurate.

You can drop "main.c:" and "This patch".

I don't think this patch really "removes unnecessary return". It looks
like you just dropped assignment/calculation done just before
returning value. That "using spatch tool" part is also misleading. You
don't really use that tool for removing it. More likely it was
noticed/suggested that that tool you use.

Please use commit message for describing your change and don't just
copy & paste topic. You can e.g. put into about "spatch" there
(instead of the topic).


> @@ -1,4 +1,4 @@
> -/*
> + patch /home/rahul/git/kernels/staging/drivers//*
>   * Sonics Silicon Backplane
>   * Subsystem core
>   *

Huh? Looks definitely wrong and I don't think it even compiles
anymore! Make sure to compile code after your change, to make sure it
does & there isn't any new warning.


> @@ -1272,9 +1272,7 @@ u32 ssb_admatch_size(u32 adm)
>         default:
>                 SSB_WARN_ON(1);
>         }
> -       size =3D (1 << (size + 1));
> -
> -       return size;
> +       return (1 << (size + 1));
>  }
>  EXPORT_SYMBOL(ssb_admatch_size);

Please rework your patch, *test it* and resend V2.

--=20
Rafa=C5=82

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ssb: main.c: This patch removes unnecessary return statement using spatch tool
  2017-01-06 22:39 ` Rafał Miłecki
@ 2017-01-06 22:40   ` Rafał Miłecki
  2017-01-06 22:46   ` Michael Büsch
  1 sibling, 0 replies; 7+ messages in thread
From: Rafał Miłecki @ 2017-01-06 22:40 UTC (permalink / raw)
  To: Rahul Krishnan
  Cc: Michael Büsch, linux-wireless@vger.kernel.org,
	Linux Kernel Mailing List

On 6 January 2017 at 23:39, Rafa=C5=82 Mi=C5=82ecki <zajec5@gmail.com> wrot=
e:
> On 6 January 2017 at 16:20, Rahul Krishnan <mrahul.krishnan@gmail.com> wr=
ote:
>> This patch removes unnecessary return statement using spatch.
>> Signed-off-by: Rahul Krishnan <mrahul.krishnan@gmail.com>

Also an extra line break above Signed-off-by is preferred. Look at
"git log" to get am overview.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ssb: main.c: This patch removes unnecessary return statement using spatch tool
  2017-01-06 22:39 ` Rafał Miłecki
  2017-01-06 22:40   ` Rafał Miłecki
@ 2017-01-06 22:46   ` Michael Büsch
  1 sibling, 0 replies; 7+ messages in thread
From: Michael Büsch @ 2017-01-06 22:46 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Rahul Krishnan, linux-wireless@vger.kernel.org,
	Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

> > @@ -1272,9 +1272,7 @@ u32 ssb_admatch_size(u32 adm)
> >         default:
> >                 SSB_WARN_ON(1);
> >         }
> > -       size = (1 << (size + 1));
> > -
> > -       return size;
> > +       return (1 << (size + 1));
> >  }
> >  EXPORT_SYMBOL(ssb_admatch_size);  

I'm all for cleaning up code, but I don't really see how this
change improves the code.

-- 
Michael

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ssb: main.c: This patch removes unnecessary return statement using spatch tool
  2017-01-06 15:20 [PATCH] ssb: main.c: This patch removes unnecessary return statement using spatch tool Rahul Krishnan
  2017-01-06 22:39 ` Rafał Miłecki
@ 2017-01-07  0:52 ` Julian Calaby
  2017-01-07 13:39 ` kbuild test robot
  2017-01-07 13:57 ` kbuild test robot
  3 siblings, 0 replies; 7+ messages in thread
From: Julian Calaby @ 2017-01-07  0:52 UTC (permalink / raw)
  To: Rahul Krishnan
  Cc: Michael Büsch, linux-wireless, linux-kernel@vger.kernel.org

Hi Rahul,

On Sat, Jan 7, 2017 at 2:20 AM, Rahul Krishnan
<mrahul.krishnan@gmail.com> wrote:
> This patch removes unnecessary return statement using spatch.

This doesn't describe the patch.

> Signed-off-by: Rahul Krishnan <mrahul.krishnan@gmail.com>
> ---
>  drivers/ssb/main.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
> index d1a7507..ae3b7fe 100644
> --- a/drivers/ssb/main.c
> +++ b/drivers/ssb/main.c
> @@ -1,4 +1,4 @@
> -/*
> + patch /home/rahul/git/kernels/staging/drivers//*

What is the purpose of this change, won't this cause the file to fail
to compile?

>   * Sonics Silicon Backplane
>   * Subsystem core
>   *
> @@ -1272,9 +1272,7 @@ u32 ssb_admatch_size(u32 adm)
>         default:
>                 SSB_WARN_ON(1);
>         }
> -       size = (1 << (size + 1));
> -
> -       return size;
> +       return (1 << (size + 1));

Is the size variable used elsewhere? If not, it's declaration should
probably be removed.

Also, there should be a blank line before the return statement.

Thanks,

-- 
Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ssb: main.c: This patch removes unnecessary return statement using spatch tool
  2017-01-06 15:20 [PATCH] ssb: main.c: This patch removes unnecessary return statement using spatch tool Rahul Krishnan
  2017-01-06 22:39 ` Rafał Miłecki
  2017-01-07  0:52 ` Julian Calaby
@ 2017-01-07 13:39 ` kbuild test robot
  2017-01-07 13:57 ` kbuild test robot
  3 siblings, 0 replies; 7+ messages in thread
From: kbuild test robot @ 2017-01-07 13:39 UTC (permalink / raw)
  To: Rahul Krishnan; +Cc: kbuild-all, m, linux-wireless, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]

Hi Rahul,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.10-rc2 next-20170106]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Rahul-Krishnan/ssb-main-c-This-patch-removes-unnecessary-return-statement-using-spatch-tool/20170107-205451
config: x86_64-randconfig-x008-201701 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> drivers/ssb/main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '/' token
     patch /home/rahul/git/kernels/staging/drivers//*
           ^
>> drivers/ssb/main.c:6:43: error: stray '@' in program
     * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
                                              ^

vim +1 drivers/ssb/main.c

   > 1	 patch /home/rahul/git/kernels/staging/drivers//*
     2	 * Sonics Silicon Backplane
     3	 * Subsystem core
     4	 *
     5	 * Copyright 2005, Broadcom Corporation
   > 6	 * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
     7	 *
     8	 * Licensed under the GNU/GPL. See COPYING for details.
     9	 */

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27927 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ssb: main.c: This patch removes unnecessary return statement using spatch tool
  2017-01-06 15:20 [PATCH] ssb: main.c: This patch removes unnecessary return statement using spatch tool Rahul Krishnan
                   ` (2 preceding siblings ...)
  2017-01-07 13:39 ` kbuild test robot
@ 2017-01-07 13:57 ` kbuild test robot
  3 siblings, 0 replies; 7+ messages in thread
From: kbuild test robot @ 2017-01-07 13:57 UTC (permalink / raw)
  To: Rahul Krishnan; +Cc: kbuild-all, m, linux-wireless, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 26233 bytes --]

Hi Rahul,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.10-rc2 next-20170106]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Rahul-Krishnan/ssb-main-c-This-patch-removes-unnecessary-return-statement-using-spatch-tool/20170107-205451
config: i386-randconfig-r0-201701 (attached as .config)
compiler: gcc-5 (Debian 5.4.1-2) 5.4.1 20160904
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/ssb/main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '/' token
     patch /home/rahul/git/kernels/staging/drivers//*
           ^
   drivers/ssb/main.c:6:43: error: stray '@' in program
     * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
                                              ^
   In file included from include/linux/ioport.h:12:0,
                    from include/linux/device.h:16,
                    from include/linux/ssb/ssb.h:4,
                    from drivers/ssb/ssb_private.h:4,
                    from drivers/ssb/main.c:11:
>> include/linux/compiler.h:110:34: warning: 'struct ftrace_branch_data' declared inside parameter list
    void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
                                     ^
>> include/linux/compiler.h:110:34: warning: its scope is only this definition or declaration, which is probably not what you want
   include/linux/err.h: In function 'IS_ERR':
   include/linux/compiler.h:117:18: error: variable '______f' has initializer but incomplete type
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:139:58: note: in expansion of macro '__branch_check__'
    #  define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
                                                             ^
   include/linux/err.h:21:25: note: in expansion of macro 'unlikely'
    #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
                            ^
   include/linux/err.h:35:9: note: in expansion of macro 'IS_ERR_VALUE'
     return IS_ERR_VALUE((unsigned long)ptr);
            ^
   include/linux/compiler.h:117:18: error: unknown field 'func' specified in initializer
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:139:58: note: in expansion of macro '__branch_check__'
    #  define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
                                                             ^
   include/linux/err.h:21:25: note: in expansion of macro 'unlikely'
    #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
                            ^
   include/linux/err.h:35:9: note: in expansion of macro 'IS_ERR_VALUE'
     return IS_ERR_VALUE((unsigned long)ptr);
            ^
   include/linux/compiler.h:121:13: warning: excess elements in struct initializer
        .func = __func__,   \
                ^
   include/linux/compiler.h:139:58: note: in expansion of macro '__branch_check__'
    #  define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
                                                             ^
   include/linux/err.h:21:25: note: in expansion of macro 'unlikely'
    #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
                            ^
   include/linux/err.h:35:9: note: in expansion of macro 'IS_ERR_VALUE'
     return IS_ERR_VALUE((unsigned long)ptr);
            ^
   include/linux/compiler.h:121:13: note: (near initialization for '______f')
        .func = __func__,   \
                ^
   include/linux/compiler.h:139:58: note: in expansion of macro '__branch_check__'
    #  define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
                                                             ^
   include/linux/err.h:21:25: note: in expansion of macro 'unlikely'
    #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
                            ^
   include/linux/err.h:35:9: note: in expansion of macro 'IS_ERR_VALUE'
     return IS_ERR_VALUE((unsigned long)ptr);
            ^
   include/linux/compiler.h:117:18: error: unknown field 'file' specified in initializer
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:139:58: note: in expansion of macro '__branch_check__'
    #  define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
                                                             ^
   include/linux/err.h:21:25: note: in expansion of macro 'unlikely'
    #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
                            ^
   include/linux/err.h:35:9: note: in expansion of macro 'IS_ERR_VALUE'
     return IS_ERR_VALUE((unsigned long)ptr);
            ^
   include/linux/err.h:35:40: warning: excess elements in struct initializer
     return IS_ERR_VALUE((unsigned long)ptr);
                                           ^
   include/linux/err.h:35:40: note: (near initialization for '______f')
   include/linux/compiler.h:117:18: error: unknown field 'line' specified in initializer
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:139:58: note: in expansion of macro '__branch_check__'
    #  define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
                                                             ^
   include/linux/err.h:21:25: note: in expansion of macro 'unlikely'
    #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
                            ^
   include/linux/err.h:35:9: note: in expansion of macro 'IS_ERR_VALUE'
     return IS_ERR_VALUE((unsigned long)ptr);
            ^
   include/linux/err.h:35:40: warning: excess elements in struct initializer
     return IS_ERR_VALUE((unsigned long)ptr);
                                           ^
   include/linux/err.h:35:40: note: (near initialization for '______f')
   include/linux/compiler.h:120:5: error: storage size of '______f' isn't known
        ______f = {    \
        ^
   include/linux/compiler.h:139:58: note: in expansion of macro '__branch_check__'
    #  define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
                                                             ^
   include/linux/err.h:21:25: note: in expansion of macro 'unlikely'
    #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
                            ^
   include/linux/err.h:35:9: note: in expansion of macro 'IS_ERR_VALUE'
     return IS_ERR_VALUE((unsigned long)ptr);
            ^
   include/linux/compiler.h:120:5: warning: unused variable '______f' [-Wunused-variable]
        ______f = {    \
        ^
   include/linux/compiler.h:139:58: note: in expansion of macro '__branch_check__'
    #  define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
                                                             ^
   include/linux/err.h:21:25: note: in expansion of macro 'unlikely'
--
            ^
   include/linux/compiler.h:121:13: note: (near initialization for '______f')
        .func = __func__,   \
                ^
   include/linux/compiler.h:139:58: note: in expansion of macro '__branch_check__'
    #  define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
                                                             ^
   arch/x86/include/asm/preempt.h:98:9: note: in expansion of macro 'unlikely'
     return unlikely(raw_cpu_read_4(__preempt_count) == preempt_offset);
            ^
   include/linux/compiler.h:117:18: error: unknown field 'file' specified in initializer
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:139:58: note: in expansion of macro '__branch_check__'
    #  define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
                                                             ^
   arch/x86/include/asm/preempt.h:98:9: note: in expansion of macro 'unlikely'
     return unlikely(raw_cpu_read_4(__preempt_count) == preempt_offset);
            ^
   arch/x86/include/asm/preempt.h:98:67: warning: excess elements in struct initializer
     return unlikely(raw_cpu_read_4(__preempt_count) == preempt_offset);
                                                                      ^
   arch/x86/include/asm/preempt.h:98:67: note: (near initialization for '______f')
   include/linux/compiler.h:117:18: error: unknown field 'line' specified in initializer
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:139:58: note: in expansion of macro '__branch_check__'
    #  define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
                                                             ^
   arch/x86/include/asm/preempt.h:98:9: note: in expansion of macro 'unlikely'
     return unlikely(raw_cpu_read_4(__preempt_count) == preempt_offset);
            ^
   arch/x86/include/asm/preempt.h:98:67: warning: excess elements in struct initializer
     return unlikely(raw_cpu_read_4(__preempt_count) == preempt_offset);
                                                                      ^
   arch/x86/include/asm/preempt.h:98:67: note: (near initialization for '______f')
   include/linux/compiler.h:120:5: error: storage size of '______f' isn't known
        ______f = {    \
        ^
   include/linux/compiler.h:139:58: note: in expansion of macro '__branch_check__'
    #  define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
                                                             ^
   arch/x86/include/asm/preempt.h:98:9: note: in expansion of macro 'unlikely'
     return unlikely(raw_cpu_read_4(__preempt_count) == preempt_offset);
            ^
   include/linux/compiler.h:120:5: warning: unused variable '______f' [-Wunused-variable]
        ______f = {    \
        ^
   include/linux/compiler.h:139:58: note: in expansion of macro '__branch_check__'
    #  define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
                                                             ^
   arch/x86/include/asm/preempt.h:98:9: note: in expansion of macro 'unlikely'
     return unlikely(raw_cpu_read_4(__preempt_count) == preempt_offset);
            ^
   include/asm-generic/qspinlock.h: In function 'queued_spin_lock':
   include/linux/compiler.h:117:18: error: variable '______f' has initializer but incomplete type
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qspinlock.h:101:6: note: in expansion of macro 'likely'
     if (likely(val == 0))
         ^
   include/linux/compiler.h:117:18: error: unknown field 'func' specified in initializer
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qspinlock.h:101:6: note: in expansion of macro 'likely'
     if (likely(val == 0))
         ^
   include/linux/compiler.h:121:13: warning: excess elements in struct initializer
        .func = __func__,   \
                ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qspinlock.h:101:6: note: in expansion of macro 'likely'
     if (likely(val == 0))
         ^
   include/linux/compiler.h:121:13: note: (near initialization for '______f')
        .func = __func__,   \
                ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qspinlock.h:101:6: note: in expansion of macro 'likely'
     if (likely(val == 0))
         ^
   include/linux/compiler.h:117:18: error: unknown field 'file' specified in initializer
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qspinlock.h:101:6: note: in expansion of macro 'likely'
     if (likely(val == 0))
         ^
>> include/asm-generic/qspinlock.h:101:21: warning: excess elements in struct initializer
     if (likely(val == 0))
                        ^
   include/asm-generic/qspinlock.h:101:21: note: (near initialization for '______f')
   include/linux/compiler.h:117:18: error: unknown field 'line' specified in initializer
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qspinlock.h:101:6: note: in expansion of macro 'likely'
     if (likely(val == 0))
         ^
>> include/asm-generic/qspinlock.h:101:21: warning: excess elements in struct initializer
     if (likely(val == 0))
                        ^
   include/asm-generic/qspinlock.h:101:21: note: (near initialization for '______f')
   include/linux/compiler.h:120:5: error: storage size of '______f' isn't known
        ______f = {    \
        ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qspinlock.h:101:6: note: in expansion of macro 'likely'
     if (likely(val == 0))
         ^
   include/linux/compiler.h:120:5: warning: unused variable '______f' [-Wunused-variable]
        ______f = {    \
        ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qspinlock.h:101:6: note: in expansion of macro 'likely'
     if (likely(val == 0))
         ^
   include/asm-generic/qrwlock.h: In function 'queued_read_trylock':
   include/linux/compiler.h:117:18: error: variable '______f' has initializer but incomplete type
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qrwlock.h:83:6: note: in expansion of macro 'likely'
     if (likely(!(cnts & _QW_WMASK))) {
         ^
   include/linux/compiler.h:117:18: error: unknown field 'func' specified in initializer
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qrwlock.h:83:6: note: in expansion of macro 'likely'
     if (likely(!(cnts & _QW_WMASK))) {
         ^
   include/linux/compiler.h:121:13: warning: excess elements in struct initializer
        .func = __func__,   \
                ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qrwlock.h:83:6: note: in expansion of macro 'likely'
     if (likely(!(cnts & _QW_WMASK))) {
         ^
   include/linux/compiler.h:121:13: note: (near initialization for '______f')
        .func = __func__,   \
                ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qrwlock.h:83:6: note: in expansion of macro 'likely'
     if (likely(!(cnts & _QW_WMASK))) {
         ^
   include/linux/compiler.h:117:18: error: unknown field 'file' specified in initializer
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qrwlock.h:83:6: note: in expansion of macro 'likely'
     if (likely(!(cnts & _QW_WMASK))) {
         ^
>> include/asm-generic/qrwlock.h:83:32: warning: excess elements in struct initializer
     if (likely(!(cnts & _QW_WMASK))) {
                                   ^
   include/asm-generic/qrwlock.h:83:32: note: (near initialization for '______f')
   include/linux/compiler.h:117:18: error: unknown field 'line' specified in initializer
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qrwlock.h:83:6: note: in expansion of macro 'likely'
     if (likely(!(cnts & _QW_WMASK))) {
         ^
>> include/asm-generic/qrwlock.h:83:32: warning: excess elements in struct initializer
     if (likely(!(cnts & _QW_WMASK))) {
                                   ^
   include/asm-generic/qrwlock.h:83:32: note: (near initialization for '______f')
   include/linux/compiler.h:120:5: error: storage size of '______f' isn't known
        ______f = {    \
        ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qrwlock.h:83:6: note: in expansion of macro 'likely'
     if (likely(!(cnts & _QW_WMASK))) {
         ^
   include/linux/compiler.h:120:5: warning: unused variable '______f' [-Wunused-variable]
        ______f = {    \
        ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qrwlock.h:83:6: note: in expansion of macro 'likely'
     if (likely(!(cnts & _QW_WMASK))) {
         ^
   include/linux/compiler.h:117:18: error: variable '______f' has initializer but incomplete type
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qrwlock.h:85:7: note: in expansion of macro 'likely'
      if (likely(!(cnts & _QW_WMASK)))
          ^
   include/linux/compiler.h:117:18: error: unknown field 'func' specified in initializer
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qrwlock.h:85:7: note: in expansion of macro 'likely'
      if (likely(!(cnts & _QW_WMASK)))
          ^
   include/linux/compiler.h:121:13: warning: excess elements in struct initializer
        .func = __func__,   \
                ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qrwlock.h:85:7: note: in expansion of macro 'likely'
      if (likely(!(cnts & _QW_WMASK)))
          ^
   include/linux/compiler.h:121:13: note: (near initialization for '______f')
        .func = __func__,   \
                ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qrwlock.h:85:7: note: in expansion of macro 'likely'
      if (likely(!(cnts & _QW_WMASK)))
          ^
   include/linux/compiler.h:117:18: error: unknown field 'file' specified in initializer
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qrwlock.h:85:7: note: in expansion of macro 'likely'
      if (likely(!(cnts & _QW_WMASK)))
          ^
   include/asm-generic/qrwlock.h:85:33: warning: excess elements in struct initializer
      if (likely(!(cnts & _QW_WMASK)))
                                    ^
   include/asm-generic/qrwlock.h:85:33: note: (near initialization for '______f')
   include/linux/compiler.h:117:18: error: unknown field 'line' specified in initializer
       static struct ftrace_branch_data  \
                     ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qrwlock.h:85:7: note: in expansion of macro 'likely'
      if (likely(!(cnts & _QW_WMASK)))
          ^
   include/asm-generic/qrwlock.h:85:33: warning: excess elements in struct initializer
      if (likely(!(cnts & _QW_WMASK)))
                                    ^
   include/asm-generic/qrwlock.h:85:33: note: (near initialization for '______f')
   include/linux/compiler.h:120:5: error: storage size of '______f' isn't known
        ______f = {    \
        ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qrwlock.h:85:7: note: in expansion of macro 'likely'
      if (likely(!(cnts & _QW_WMASK)))
          ^
   include/linux/compiler.h:120:5: warning: unused variable '______f' [-Wunused-variable]
        ______f = {    \
        ^
   include/linux/compiler.h:136:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^
   include/asm-generic/qrwlock.h:85:7: note: in expansion of macro 'likely'
      if (likely(!(cnts & _QW_WMASK)))
..

vim +212 drivers/ssb/main.c

3ba6018a Michael Buesch 2009-11-23  196   *
3ba6018a Michael Buesch 2009-11-23  197   * After freezing no device driver will be handling a device
3ba6018a Michael Buesch 2009-11-23  198   * on this bus anymore. ssb_devices_thaw() must be called after
3ba6018a Michael Buesch 2009-11-23  199   * a successful freeze to reactivate the devices.
3ba6018a Michael Buesch 2009-11-23  200   *
3ba6018a Michael Buesch 2009-11-23  201   * @bus: The bus.
3ba6018a Michael Buesch 2009-11-23  202   * @ctx: Context structure. Pass this to ssb_devices_thaw().
3ba6018a Michael Buesch 2009-11-23  203   */
3ba6018a Michael Buesch 2009-11-23  204  int ssb_devices_freeze(struct ssb_bus *bus, struct ssb_freeze_context *ctx)
61e115a5 Michael Buesch 2007-09-18  205  {
3ba6018a Michael Buesch 2009-11-23  206  	struct ssb_device *sdev;
3ba6018a Michael Buesch 2009-11-23  207  	struct ssb_driver *sdrv;
3ba6018a Michael Buesch 2009-11-23  208  	unsigned int i;
3ba6018a Michael Buesch 2009-11-23  209  
3ba6018a Michael Buesch 2009-11-23  210  	memset(ctx, 0, sizeof(*ctx));
3ba6018a Michael Buesch 2009-11-23  211  	ctx->bus = bus;
3ba6018a Michael Buesch 2009-11-23 @212  	SSB_WARN_ON(bus->nr_devices > ARRAY_SIZE(ctx->device_frozen));
61e115a5 Michael Buesch 2007-09-18  213  
61e115a5 Michael Buesch 2007-09-18  214  	for (i = 0; i < bus->nr_devices; i++) {
3ba6018a Michael Buesch 2009-11-23  215  		sdev = ssb_device_get(&bus->devices[i]);
3ba6018a Michael Buesch 2009-11-23  216  
3ba6018a Michael Buesch 2009-11-23  217  		if (!sdev->dev || !sdev->dev->driver ||
3ba6018a Michael Buesch 2009-11-23  218  		    !device_is_registered(sdev->dev)) {
3ba6018a Michael Buesch 2009-11-23  219  			ssb_device_put(sdev);
61e115a5 Michael Buesch 2007-09-18  220  			continue;

:::::: The code at line 212 was first introduced by commit
:::::: 3ba6018aa314559c5867138a8173b068268a70db ssb: Fix SPROM writing

:::::: TO: Michael Buesch <mb@bu3sch.de>
:::::: CC: John W. Linville <linville@tuxdriver.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 21800 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-01-07 13:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-06 15:20 [PATCH] ssb: main.c: This patch removes unnecessary return statement using spatch tool Rahul Krishnan
2017-01-06 22:39 ` Rafał Miłecki
2017-01-06 22:40   ` Rafał Miłecki
2017-01-06 22:46   ` Michael Büsch
2017-01-07  0:52 ` Julian Calaby
2017-01-07 13:39 ` kbuild test robot
2017-01-07 13:57 ` kbuild test robot

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).