Message ID | 20190813214340.15533-4-revanth.rajashekar@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | block: sed-opal: Code Cleanup Patches | expand |
lgtm Reviewed-by: Jon Derrick <jonathan.derrick@intel.com> On Tue, 2019-08-13 at 15:43 -0600, Revanth Rajashekar wrote: > Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com> > --- > block/opal_proto.h | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/block/opal_proto.h b/block/opal_proto.h > index 562b78f40824..5532412d567c 100644 > --- a/block/opal_proto.h > +++ b/block/opal_proto.h > @@ -119,8 +119,6 @@ enum opal_uid { > OPAL_UID_HEXFF, > }; > > -#define OPAL_METHOD_LENGTH 8 > - > /* Enum for indexing the OPALMETHOD array */ > enum opal_method { > OPAL_PROPERTIES, > -- > 2.17.1 >
On Tue, Aug 13, 2019 at 03:43:40PM -0600, Revanth Rajashekar wrote: > Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com> Reviewed-by: Scott Bauer <sbauer@plzdonthack.me> Two things, Can we also change the title of this commit to: "Removed duplicate OPAL_METHOD_LENGTH definition" 2nd, I'm dumb as hell now adays, why doesn't this throw a compiler error for multiple declarations?
The re-definition error is thrown only when 2 different values are assigned to the same #define variable. But in this case, the same value is defined twice... hence the compiler doesn't throw error. Thank you :) Revanth Rajashekar -----Original Message----- From: Scott Bauer [mailto:sbauer@plzdonthack.me] Sent: Wednesday, August 14, 2019 10:08 PM To: Rajashekar, Revanth <revanth.rajashekar@intel.com> Cc: linux-block@vger.kernel.org; Derrick, Jonathan <jonathan.derrick@intel.com> Subject: Re: [PATCH 3/3] block: sed-opal: OPAL_METHOD_LENGTH defined twice On Tue, Aug 13, 2019 at 03:43:40PM -0600, Revanth Rajashekar wrote: > Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com> Reviewed-by: Scott Bauer <sbauer@plzdonthack.me> Two things, Can we also change the title of this commit to: "Removed duplicate OPAL_METHOD_LENGTH definition" 2nd, I'm dumb as hell now adays, why doesn't this throw a compiler error for multiple declarations?
diff --git a/block/opal_proto.h b/block/opal_proto.h index 562b78f40824..5532412d567c 100644 --- a/block/opal_proto.h +++ b/block/opal_proto.h @@ -119,8 +119,6 @@ enum opal_uid { OPAL_UID_HEXFF, }; -#define OPAL_METHOD_LENGTH 8 - /* Enum for indexing the OPALMETHOD array */ enum opal_method { OPAL_PROPERTIES,
Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com> --- block/opal_proto.h | 2 -- 1 file changed, 2 deletions(-) -- 2.17.1