Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1585555

Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple line dereference

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple line dereference
Date 2017-02-21 18:30 +0100
Message-ID <tdmqe-5F2-19@gated-at.bofh.it> (permalink)
References (3 earlier) <td06m-7EN-27@gated-at.bofh.it> <tdf5o-Gy-11@gated-at.bofh.it> <tdfI5-19o-13@gated-at.bofh.it> <tdfRM-1cI-17@gated-at.bofh.it> <tdlDR-55Q-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 2017-02-22 at 00:31 +0800, Cheah Kok Cheong wrote:
> > Another option could be using the typedefs from include/linux/types.h,
> > e.g. ushort.  However, this might require changing other declarations as
> > well to keep consistency.
> 
> Thanks for the idea. I counted seven instances of 'unsigned short'
> in this file so it's not viable for our situation.

I believe using ushort is relatively undesirable as
"unsigned short" is preferred ~10:1 in the kernel

$ git grep -w ushort | wc -l
1381
$ git grep -E "\bunsigned\s+short\b" | wc -l
11288

$ git grep --name-only -w "ushort" | wc -l
129
$ git grep --name-only -E "\bunsigned\s+short\b" | wc -l
2497

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple line dereference Cheah Kok Cheong <thrust73@gmail.com> - 2017-02-20 09:40 +0100
  Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple  line dereference Ian Abbott <abbotti@mev.co.uk> - 2017-02-20 11:10 +0100
    Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple  line dereference Cheah Kok Cheong <thrust73@gmail.com> - 2017-02-20 17:10 +0100
      Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple  line dereference Ian Abbott <abbotti@mev.co.uk> - 2017-02-20 18:40 +0100
        Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple  line dereference Cheah Kok Cheong <thrust73@gmail.com> - 2017-02-21 10:40 +0100
          Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple  line dereference Ian Abbott <abbotti@mev.co.uk> - 2017-02-21 11:20 +0100
            Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple  line dereference Valentin Rothberg <valentinrothberg@gmail.com> - 2017-02-21 11:30 +0100
              Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple  line dereference Cheah Kok Cheong <thrust73@gmail.com> - 2017-02-21 17:40 +0100
                Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple  line dereference Joe Perches <joe@perches.com> - 2017-02-21 18:30 +0100
                Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple  line dereference Valentin Rothberg <valentinrothberg@gmail.com> - 2017-02-22 09:40 +0100

csiph-web