Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1677495 > unrolled thread
| Started by | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| First post | 2017-06-29 09:50 +0200 |
| Last post | 2017-07-01 23:10 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] scsi: ibmvscsi: constify dev_pm_ops structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-06-29 09:50 +0200
Re: [PATCH] scsi: ibmvscsi: constify dev_pm_ops structures. Tyrel Datwyler <tyreld@linux.vnet.ibm.com> - 2017-06-30 00:40 +0200
Re: [PATCH] scsi: ibmvscsi: constify dev_pm_ops structures. "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-07-01 23:10 +0200
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-06-29 09:50 +0200 |
| Subject | [PATCH] scsi: ibmvscsi: constify dev_pm_ops structures. |
| Message-ID | <tXCn8-4LC-11@gated-at.bofh.it> |
dev_pm_ops are not supposed to change at runtime. All functions
working with dev_pm_ops provided by <linux/device.h> work with const
dev_pm_ops. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
17956 1456 8 19420 4bdc drivers/scsi/ibmvscsi/ibmvscsi.o
File size After adding 'const':
text data bss dec hex filename
18164 1264 8 19436 4bec drivers/scsi/ibmvscsi/ibmvscsi.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index 1deb0a9..da22b36 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -2336,7 +2336,7 @@ static int ibmvscsi_resume(struct device *dev)
};
MODULE_DEVICE_TABLE(vio, ibmvscsi_device_table);
-static struct dev_pm_ops ibmvscsi_pm_ops = {
+static const struct dev_pm_ops ibmvscsi_pm_ops = {
.resume = ibmvscsi_resume
};
--
1.9.1
[toc] | [next] | [standalone]
| From | Tyrel Datwyler <tyreld@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-06-30 00:40 +0200 |
| Message-ID | <tXQgp-5oe-9@gated-at.bofh.it> |
| In reply to | #1677495 |
On 06/29/2017 12:43 AM, Arvind Yadav wrote: > dev_pm_ops are not supposed to change at runtime. All functions > working with dev_pm_ops provided by <linux/device.h> work with const > dev_pm_ops. So mark the non-const structs as const. > > File size before: > text data bss dec hex filename > 17956 1456 8 19420 4bdc drivers/scsi/ibmvscsi/ibmvscsi.o > > File size After adding 'const': > text data bss dec hex filename > 18164 1264 8 19436 4bec drivers/scsi/ibmvscsi/ibmvscsi.o > > Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Acked-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
[toc] | [prev] | [next] | [standalone]
| From | "Martin K. Petersen" <martin.petersen@oracle.com> |
|---|---|
| Date | 2017-07-01 23:10 +0200 |
| Message-ID | <tYxOp-6Z-5@gated-at.bofh.it> |
| In reply to | #1677495 |
Arvind, > dev_pm_ops are not supposed to change at runtime. All functions > working with dev_pm_ops provided by <linux/device.h> work with const > dev_pm_ops. So mark the non-const structs as const. Applied to 4.13/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web