Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1350159
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH net-next v3 2/4] cxgb4i: don't redefine DIV_ROUND_UP |
| Date | 2016-03-04 12:10 +0100 |
| Message-ID | <r8VMm-5IQ-13@gated-at.bofh.it> (permalink) |
| References | <r8VCF-5oY-5@gated-at.bofh.it> <r8VCF-5oY-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
let's use the common definition to avoid the following warning during the
compilation:
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c:161:0: warning: "DIV_ROUND_UP" redefined
#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
^
In file included from include/linux/list.h:8:0,
from include/linux/module.h:9,
from drivers/scsi/cxgbi/cxgb4i/cxgb4i.c:16:
include/linux/kernel.h:67:0: note: this is the location of the previous definition
#define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP
^
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index 804806e1cbb4..339f6b7f4803 100644
--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -13,6 +13,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
+#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <scsi/scsi_host.h>
@@ -158,7 +159,6 @@ static struct scsi_transport_template *cxgb4i_stt;
* open/close/abort and data send/receive.
*/
-#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
#define RCV_BUFSIZ_MASK 0x3FFU
#define MAX_IMM_TX_PKT_LEN 256
--
2.4.2
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next v3 0/4] uapi: consolidate DIV_ROUND_UP definition Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2016-03-04 12:00 +0100
[PATCH net-next v3 4/4] ethtool.h: define INT_MAX for userland Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2016-03-04 12:00 +0100
Re: [PATCH net-next v3 4/4] ethtool.h: define INT_MAX for userland Nikolay Aleksandrov <nikolay@cumulusnetworks.com> - 2016-03-04 14:20 +0100
[PATCH net-next v3 3/4] drm/vmwgfx: remove userland definition of DIV_ROUND_UP Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2016-03-04 12:10 +0100
Re: [PATCH net-next v3 3/4] drm/vmwgfx: remove userland definition of DIV_ROUND_UP Emil Velikov <emil.l.velikov@gmail.com> - 2016-03-04 22:40 +0100
[PATCH net-next v3 2/4] cxgb4i: don't redefine DIV_ROUND_UP Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2016-03-04 12:10 +0100
Re: [PATCH net-next v3 0/4] uapi: consolidate DIV_ROUND_UP definition David Miller <davem@davemloft.net> - 2016-03-04 22:20 +0100
csiph-web