Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1619296
| From | Joe Perches <joe@perches.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/3] IB/srp: Enclose 14 expressions for the sizeof operator by parentheses |
| Date | 2017-04-08 17:00 +0200 |
| Message-ID | <tu00i-6yJ-7@gated-at.bofh.it> (permalink) |
| References | <ttXvs-56J-3@gated-at.bofh.it> <ttXvs-56J-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sat, 2017-04-08 at 14:12 +0200, SF Markus Elfring wrote: [] > diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c [] > @@ -3308,7 +3308,7 @@ static ssize_t srp_create_target(struct device *dev, > target_host->max_channel = 0; > target_host->max_id = 1; > target_host->max_lun = -1LL; > - target_host->max_cmd_len = sizeof ((struct srp_cmd *) (void *) 0L)->cdb; > + target_host->max_cmd_len = sizeof(((struct srp_cmd *)(void *)0L)->cdb); Maybe better as: target_host->max_cmd_len = FIELD_SIZEOF(struct srp_cmd, cdb);
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/3] InfiniBand-SRP: Fine-tuning for some function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-08 14:20 +0200
[PATCH 1/3] IB/srp: Use kmalloc_array() in srp_alloc_req_data() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-08 14:20 +0200
[PATCH 3/3] IB/srp: Delete unwanted spaces behind usages of the sizeof operator SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-08 14:20 +0200
[PATCH 2/3] IB/srp: Enclose 14 expressions for the sizeof operator by parentheses SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-08 14:20 +0200
Re: [PATCH 2/3] IB/srp: Enclose 14 expressions for the sizeof operator by parentheses Joe Perches <joe@perches.com> - 2017-04-08 17:00 +0200
csiph-web