Message ID | 20171006213333.6721-41-bart.vanassche@wdc.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
> Subject: [PATCH 40/47] IB/qib: Make qib_inc_eeprom_err() macro more safe > to use > > Avoid that using the qib_inc_eeprom_err() macro in an if-statement > triggers the following compiler warning: > > warning: suggest braces around empty body in an 'if' statement [-Wempty- > body] > There needs to be a follow-on patch here to get rid of the uses of this macro. The original fix got rid of a bad implementation, but should have totally removed both the function and its use. The is not the fault of this patch. Fixes: 18c0b82a3e45 (" IB/qib: Do not write EEPROM") Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Mike -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 2017-10-10 at 14:15 +0000, Marciniszyn, Mike wrote: > > Subject: [PATCH 40/47] IB/qib: Make qib_inc_eeprom_err() macro more safe > > to use > > > > Avoid that using the qib_inc_eeprom_err() macro in an if-statement > > triggers the following compiler warning: > > > > warning: suggest braces around empty body in an 'if' statement [-Wempty- > > body] > > > > There needs to be a follow-on patch here to get rid of the uses of this macro. > > The original fix got rid of a bad implementation, but should have totally > removed both the function and its use. > > The is not the fault of this patch. > > Fixes: 18c0b82a3e45 (" IB/qib: Do not write EEPROM") > Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Hello Mike, How about dropping this patch and replacing it with a patch that removes all uses of qib_inc_eeprom_err()? Thanks, Bart.
> > Hello Mike, > > How about dropping this patch and replacing it with a patch that removes all > uses > of qib_inc_eeprom_err()? > I'm fine with that too. Mike
T24gVHVlLCAyMDE3LTEwLTEwIGF0IDE1OjM2ICswMDAwLCBNYXJjaW5pc3p5biwgTWlrZSB3cm90 ZToNCj4gQmFydCB3cm90ZToNCj4gPiBIb3cgYWJvdXQgZHJvcHBpbmcgdGhpcyBwYXRjaCBhbmQg cmVwbGFjaW5nIGl0IHdpdGggYSBwYXRjaCB0aGF0IHJlbW92ZXMgYWxsDQo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ZXJyYnVmcyhkZC0+cHBvcnQp Ow0K -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Oct 10, 2017 at 05:59:51PM +0000, Bart Van Assche wrote: > On Tue, 2017-10-10 at 15:36 +0000, Marciniszyn, Mike wrote: > > Bart wrote: > > > How about dropping this patch and replacing it with a patch that removes all > > > uses of qib_inc_eeprom_err()? > > > > I'm fine with that too. > > How about the patch below? > > Thanks, > > Bart. > > > Subject: [PATCH] IB/qib: Remove the qib_inc_eeprom_err() macro > > Since the body of the qib_inc_eeprom_err() macro is empty, remove > the invocations of this macro. > > References: commit 18c0b82a3e45 (" IB/qib: Do not write EEPROM") > Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> > Cc: Mike Marciniszyn <infinipath@intel.com> > --- > drivers/infiniband/hw/qib/qib.h | 1 - > drivers/infiniband/hw/qib/qib_iba6120.c | 11 ----------- > drivers/infiniband/hw/qib/qib_iba7220.c | 10 ---------- > drivers/infiniband/hw/qib/qib_iba7322.c | 6 +----- > 4 files changed, 1 insertion(+), 27 deletions(-) > > diff --git a/drivers/infiniband/hw/qib/qib.h b/drivers/infiniband/hw/qib/qib.h > index 1167a9c1776b..1869fce0ba00 100644 > --- a/drivers/infiniband/hw/qib/qib.h > +++ b/drivers/infiniband/hw/qib/qib.h > @@ -1297,7 +1297,6 @@ int qib_twsi_blk_rd(struct qib_devdata *dd, int dev, int addr, void *buffer, > int qib_twsi_blk_wr(struct qib_devdata *dd, int dev, int addr, > const void *buffer, int len); > void qib_get_eeprom_info(struct qib_devdata *); > -#define qib_inc_eeprom_err(dd, eidx, incr) > void qib_dump_lookup_output_queue(struct qib_devdata *); > void qib_force_pio_avail_update(struct qib_devdata *); > void qib_clear_symerror_on_linkup(unsigned long opaque); > diff --git a/drivers/infiniband/hw/qib/qib_iba6120.c b/drivers/infiniband/hw/qib/qib_iba6120.c > index c4a4c57e0f0a..e0b52bab6f34 100644 > --- a/drivers/infiniband/hw/qib/qib_iba6120.c > +++ b/drivers/infiniband/hw/qib/qib_iba6120.c > @@ -748,7 +748,6 @@ static void qib_handle_6120_hwerrors(struct qib_devdata *dd, char *msg, > u32 bits, ctrl; > int isfatal = 0; > char *bitsmsg; > - int log_idx; > > hwerrs = qib_read_kreg64(dd, kr_hwerrstatus); > if (!hwerrs) > @@ -770,11 +769,6 @@ static void qib_handle_6120_hwerrors(struct qib_devdata *dd, char *msg, > > hwerrs &= dd->cspec->hwerrmask; > > - /* We log some errors to EEPROM, check if we have any of those. */ > - for (log_idx = 0; log_idx < QIB_EEP_LOG_CNT; ++log_idx) > - if (hwerrs & dd->eep_st_masks[log_idx].hwerrs_to_log) Does it mean that you can get rid of eep_st_masks and QIB_EEP_LOG_CNT too? > - qib_inc_eeprom_err(dd, log_idx, 1); > - > /* > * Make sure we get this much out, unless told to be quiet, > * or it's occurred within the last 5 seconds. > @@ -1004,7 +998,6 @@ static void handle_6120_errors(struct qib_devdata *dd, u64 errs) > char *msg; > u64 ignore_this_time = 0; > u64 iserr = 0; > - int log_idx; > struct qib_pportdata *ppd = dd->pport; > u64 mask; > > @@ -1015,10 +1008,6 @@ static void handle_6120_errors(struct qib_devdata *dd, u64 errs) > /* do these first, they are most important */ > if (errs & ERR_MASK(HardwareErr)) > qib_handle_6120_hwerrors(dd, msg, sizeof(dd->cspec->emsgbuf)); > - else > - for (log_idx = 0; log_idx < QIB_EEP_LOG_CNT; ++log_idx) > - if (errs & dd->eep_st_masks[log_idx].errs_to_log) > - qib_inc_eeprom_err(dd, log_idx, 1); > > if (errs & ~IB_E_BITSEXTANT) > qib_dev_err(dd, > diff --git a/drivers/infiniband/hw/qib/qib_iba7220.c b/drivers/infiniband/hw/qib/qib_iba7220.c > index 78ce79be4120..75f2cfd0d272 100644 > --- a/drivers/infiniband/hw/qib/qib_iba7220.c > +++ b/drivers/infiniband/hw/qib/qib_iba7220.c > @@ -1094,7 +1094,6 @@ static void handle_7220_errors(struct qib_devdata *dd, u64 errs) > char *msg; > u64 ignore_this_time = 0; > u64 iserr = 0; > - int log_idx; > struct qib_pportdata *ppd = dd->pport; > u64 mask; > > @@ -1105,10 +1104,6 @@ static void handle_7220_errors(struct qib_devdata *dd, u64 errs) > /* do these first, they are most important */ > if (errs & ERR_MASK(HardwareErr)) > qib_7220_handle_hwerrors(dd, msg, sizeof(dd->cspec->emsgbuf)); > - else > - for (log_idx = 0; log_idx < QIB_EEP_LOG_CNT; ++log_idx) > - if (errs & dd->eep_st_masks[log_idx].errs_to_log) > - qib_inc_eeprom_err(dd, log_idx, 1); > > if (errs & QLOGIC_IB_E_SDMAERRS) > sdma_7220_errors(ppd, errs); > @@ -1302,7 +1297,6 @@ static void qib_7220_handle_hwerrors(struct qib_devdata *dd, char *msg, > u32 bits, ctrl; > int isfatal = 0; > char *bitsmsg; > - int log_idx; > > hwerrs = qib_read_kreg64(dd, kr_hwerrstatus); > if (!hwerrs) > @@ -1326,10 +1320,6 @@ static void qib_7220_handle_hwerrors(struct qib_devdata *dd, char *msg, > > hwerrs &= dd->cspec->hwerrmask; > > - /* We log some errors to EEPROM, check if we have any of those. */ > - for (log_idx = 0; log_idx < QIB_EEP_LOG_CNT; ++log_idx) > - if (hwerrs & dd->eep_st_masks[log_idx].hwerrs_to_log) > - qib_inc_eeprom_err(dd, log_idx, 1); > if (hwerrs & ~(TXEMEMPARITYERR_PIOBUF | TXEMEMPARITYERR_PIOPBC | > RXE_PARITY)) > qib_devinfo(dd->pcidev, > diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c > index 4d02cffe4e03..77217fae9c06 100644 > --- a/drivers/infiniband/hw/qib/qib_iba7322.c > +++ b/drivers/infiniband/hw/qib/qib_iba7322.c > @@ -1644,7 +1644,6 @@ static noinline void handle_7322_errors(struct qib_devdata *dd) > u64 iserr = 0; > u64 errs; > u64 mask; > - int log_idx; > > qib_stats.sps_errints++; > errs = qib_read_kreg64(dd, kr_errstatus); > @@ -1662,10 +1661,7 @@ static noinline void handle_7322_errors(struct qib_devdata *dd) > if (errs & QIB_E_HARDWARE) { > *msg = '\0'; > qib_7322_handle_hwerrors(dd, msg, sizeof(dd->cspec->emsgbuf)); > - } else > - for (log_idx = 0; log_idx < QIB_EEP_LOG_CNT; ++log_idx) > - if (errs & dd->eep_st_masks[log_idx].errs_to_log) > - qib_inc_eeprom_err(dd, log_idx, 1); > + } > > if (errs & QIB_E_SPKTERRS) { > qib_disarm_7322_senderrbufs(dd->pport); > N?????r??y????b?X??ǧv?^?){.n?+????{??ٚ?{ay?ʇڙ?,j??f???h???z??w??????j:+v???w?j?m????????zZ+?????ݢj"??!
diff --git a/drivers/infiniband/hw/qib/qib.h b/drivers/infiniband/hw/qib/qib.h index 1167a9c1776b..f2fffbd3e95c 100644 --- a/drivers/infiniband/hw/qib/qib.h +++ b/drivers/infiniband/hw/qib/qib.h @@ -1297,7 +1297,7 @@ int qib_twsi_blk_rd(struct qib_devdata *dd, int dev, int addr, void *buffer, int qib_twsi_blk_wr(struct qib_devdata *dd, int dev, int addr, const void *buffer, int len); void qib_get_eeprom_info(struct qib_devdata *); -#define qib_inc_eeprom_err(dd, eidx, incr) +#define qib_inc_eeprom_err(dd, eidx, incr) do { } while (0) void qib_dump_lookup_output_queue(struct qib_devdata *); void qib_force_pio_avail_update(struct qib_devdata *); void qib_clear_symerror_on_linkup(unsigned long opaque);
Avoid that using the qib_inc_eeprom_err() macro in an if-statement triggers the following compiler warning: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Mike Marciniszyn <infinipath@intel.com> --- drivers/infiniband/hw/qib/qib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)