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


Groups > linux.kernel > #1614267

Re: [PATCH 1/3] iio: health: afe440x: Remove code in comments

From SIMRAN SINGHAL <singhalsimran0@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] iio: health: afe440x: Remove code in comments
Date 2017-03-31 21:20 +0200
Message-ID <trafv-iO-15@gated-at.bofh.it> (permalink)
References <tr7Um-76y-5@gated-at.bofh.it> <tr7Ul-76y-3@gated-at.bofh.it> <tr9CO-8h2-11@gated-at.bofh.it> <tr9Mt-8kr-3@gated-at.bofh.it> <tr9Wa-8nY-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Please ignore this Patch. This Patch is wrong.

On Sat, Apr 1, 2017 at 12:20 AM, Joe Perches <joe@perches.com> wrote:
> On Sat, 2017-04-01 at 00:13 +0530, SIMRAN SINGHAL wrote:
>> On Sat, Apr 1, 2017 at 12:03 AM, Joe Perches <joe@perches.com> wrote:
>> > On Fri, 2017-03-31 at 22:16 +0530, simran singhal wrote:
>> > > Commenting out code is a bad idea.
>> > > As comments are for explaining what code is about.
>> >
>> > patch doesn't match commit message.
>>
>> In commit message I am clearly saying commenting out the code is a bad Idea.
>> As comments are for explaining what code is about.
>> And that's what I am doing in the patch deleting the commented codes.
>>
>> My subject also says "Remove code in comments"
>>
>> Than what is not matching?
>
> Read your own patch.
>
> You are removing #defines not comments.
>
> If the whole thing is in comments, then
> the #defines immediately above what you
> are removing should also be deleted.
>
>> >
>> > > Signed-off-by: simran singhal <singhalsimran0@gmail.com>
>> > > ---
>> > >  drivers/iio/health/afe440x.h | 58 --------------------------------------------
>> > >  1 file changed, 58 deletions(-)
>> > >
>> > > diff --git a/drivers/iio/health/afe440x.h b/drivers/iio/health/afe440x.h
>> > > index 1a0f247..71e2f0e 100644
>> > > --- a/drivers/iio/health/afe440x.h
>> > > +++ b/drivers/iio/health/afe440x.h
>> > > @@ -88,56 +88,11 @@
>> > >  #define AFE440X_CONTROL0_WRITE               0x0
>> > >  #define AFE440X_CONTROL0_READ                0x1
>> > >
>> > > -#define AFE440X_INTENSITY_CHAN(_index, _mask)                        \
>> > > -     {                                                       \
>> > > -             .type = IIO_INTENSITY,                          \
>> > > -             .channel = _index,                              \
>> > > -             .address = _index,                              \
>> > > -             .scan_index = _index,                           \
>> > > -             .scan_type = {                                  \
>> > > -                             .sign = 's',                    \
>> > > -                             .realbits = 24,                 \
>> > > -                             .storagebits = 32,              \
>> > > -                             .endianness = IIO_CPU,          \
>> > > -             },                                              \
>> > > -             .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |  \
>> > > -                     _mask,                                  \
>> > > -             .indexed = true,                                \
>> > > -     }
>> > > -
>> > > -#define AFE440X_CURRENT_CHAN(_index)                         \
>> > > -     {                                                       \
>> > > -             .type = IIO_CURRENT,                            \
>> > > -             .channel = _index,                              \
>> > > -             .address = _index,                              \
>> > > -             .scan_index = -1,                               \
>> > > -             .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |  \
>> > > -                     BIT(IIO_CHAN_INFO_SCALE),               \
>> > > -             .indexed = true,                                \
>> > > -             .output = true,                                 \
>> > > -     }
>> > > -
>> > >  struct afe440x_val_table {
>> > >       int integer;
>> > >       int fract;
>> > >  };
>> > >
>> > > -#define AFE440X_TABLE_ATTR(_name, _table)                            \
>> > > -static ssize_t _name ## _show(struct device *dev,                    \
>> > > -                           struct device_attribute *attr, char *buf) \
>> > > -{                                                                    \
>> > > -     ssize_t len = 0;                                                \
>> > > -     int i;                                                          \
>> > > -                                                                     \
>> > > -     for (i = 0; i < ARRAY_SIZE(_table); i++)                        \
>> > > -             len += scnprintf(buf + len, PAGE_SIZE - len, "%d.%06u ", \
>> > > -                              _table[i].integer,                     \
>> > > -                              _table[i].fract);                      \
>> > > -                                                                     \
>> > > -     buf[len - 1] = '\n';                                            \
>> > > -                                                                     \
>> > > -     return len;                                                     \
>> > > -}                                                                    \
>> > >  static DEVICE_ATTR_RO(_name)
>> > >
>> > >  struct afe440x_attr {
>> > > @@ -147,17 +102,4 @@ struct afe440x_attr {
>> > >       unsigned int table_size;
>> > >  };
>> > >
>> > > -#define to_afe440x_attr(_dev_attr)                           \
>> > > -     container_of(_dev_attr, struct afe440x_attr, dev_attr)
>> > > -
>> > > -#define AFE440X_ATTR(_name, _field, _table)                  \
>> > > -     struct afe440x_attr afe440x_attr_##_name = {            \
>> > > -             .dev_attr = __ATTR(_name, (S_IRUGO | S_IWUSR),  \
>> > > -                                afe440x_show_register,       \
>> > > -                                afe440x_store_register),     \
>> > > -             .field = _field,                                \
>> > > -             .val_table = _table,                            \
>> > > -             .table_size = ARRAY_SIZE(_table),               \
>> > > -     }
>> > > -
>> > >  #endif /* _AFE440X_H */

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


Thread

[PATCH 0/3] iio: health: Clean up simran singhal <singhalsimran0@gmail.com> - 2017-03-31 18:50 +0200
  [PATCH 1/3] iio: health: afe440x: Remove code in comments simran singhal <singhalsimran0@gmail.com> - 2017-03-31 18:50 +0200
    Re: [PATCH 1/3] iio: health: afe440x: Remove code in comments Joe Perches <joe@perches.com> - 2017-03-31 20:40 +0200
      Re: [PATCH 1/3] iio: health: afe440x: Remove code in comments SIMRAN SINGHAL <singhalsimran0@gmail.com> - 2017-03-31 20:50 +0200
        Re: [PATCH 1/3] iio: health: afe440x: Remove code in comments Joe Perches <joe@perches.com> - 2017-03-31 21:00 +0200
          Re: [PATCH 1/3] iio: health: afe440x: Remove code in comments SIMRAN SINGHAL <singhalsimran0@gmail.com> - 2017-03-31 21:20 +0200
    Re: [PATCH 1/3] iio: health: afe440x: Remove code in comments kbuild test robot <lkp@intel.com> - 2017-04-02 07:30 +0200
  [PATCH 2/3] iio: health: afe4404: Remove all unused functions simran singhal <singhalsimran0@gmail.com> - 2017-03-31 18:50 +0200
  [PATCH 3/3] iio: health: afe4403: Remove all unused functions simran singhal <singhalsimran0@gmail.com> - 2017-03-31 18:50 +0200
  Re: [PATCH 0/3] iio: health: Clean up SIMRAN SINGHAL <singhalsimran0@gmail.com> - 2017-03-31 21:10 +0200

csiph-web