Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1712044 > unrolled thread
| Started by | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| First post | 2017-08-15 12:40 +0200 |
| Last post | 2017-08-15 12:40 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[RFT 06/13] s390: tape_34xx: constify ccw_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-15 12:40 +0200
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-08-15 12:40 +0200 |
| Subject | [RFT 06/13] s390: tape_34xx: constify ccw_device_id |
| Message-ID | <ueHqp-8q-1@gated-at.bofh.it> |
ccw_device_id are not supposed to change at runtime. All functions
working with ccw_device_id provided by <asm/ccwdev.h> work with
const ccw_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/s390/char/tape_34xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c
index de69f0d..7204b6f 100644
--- a/drivers/s390/char/tape_34xx.c
+++ b/drivers/s390/char/tape_34xx.c
@@ -1165,7 +1165,7 @@ static struct tape_discipline tape_discipline_34xx = {
.mtop_array = tape_34xx_mtop
};
-static struct ccw_device_id tape_34xx_ids[] = {
+static const struct ccw_device_id tape_34xx_ids[] = {
{ CCW_DEVICE_DEVTYPE(0x3480, 0, 0x3480, 0), .driver_info = tape_3480},
{ CCW_DEVICE_DEVTYPE(0x3490, 0, 0x3490, 0), .driver_info = tape_3490},
{ /* end of list */ },
--
2.7.4
Back to top | Article view | linux.kernel
csiph-web