Message ID | 1472415458-430-1-git-send-email-Julia.Lawall@lip6.fr (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
>>>>> "Julia" == Julia Lawall <Julia.Lawall@lip6.fr> writes:
Julia> sr_pm_ops, of type struct dev_pm_ops, is never modified, so
Julia> declare it as const.
Applied to 4.9/scsi-queue.
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index ed17934..bed2bbd 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -83,7 +83,7 @@ static int sr_init_command(struct scsi_cmnd *SCpnt); static int sr_done(struct scsi_cmnd *); static int sr_runtime_suspend(struct device *dev); -static struct dev_pm_ops sr_pm_ops = { +static const struct dev_pm_ops sr_pm_ops = { .runtime_suspend = sr_runtime_suspend, };
sr_pm_ops, of type struct dev_pm_ops, is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> --- drivers/scsi/sr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html