Message ID | 1577864614-5543-14-git-send-email-Julia.Lawall@inria.fr |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | constify copied structure | expand |
On Wed, Jan 01, 2020 at 08:43:31AM +0100, Julia Lawall wrote: > The idtcm_caps structure is only copied into another structure, > so make it const. > > The opportunity for this change was found using Coccinelle. > > Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Acked-by: Richard Cochran <richardcochran@gmail.com>
From: Julia Lawall <Julia.Lawall@inria.fr> Date: Wed, 1 Jan 2020 08:43:31 +0100 > The idtcm_caps structure is only copied into another structure, > so make it const. > > The opportunity for this change was found using Coccinelle. > > Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Applied to net-next.
diff --git a/drivers/ptp/ptp_clockmatrix.c b/drivers/ptp/ptp_clockmatrix.c index a5110b7b4ece..e85836715f0b 100644 --- a/drivers/ptp/ptp_clockmatrix.c +++ b/drivers/ptp/ptp_clockmatrix.c @@ -1102,7 +1102,7 @@ static void idtcm_display_version_info(struct idtcm *idtcm) product_id, hw_rev_id, bond_id, csr_id, irq_id); } -static struct ptp_clock_info idtcm_caps = { +static const struct ptp_clock_info idtcm_caps = { .owner = THIS_MODULE, .max_adj = 244000, .n_per_out = 1,
The idtcm_caps structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> --- drivers/ptp/ptp_clockmatrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)