Skip to contentSkip to conversation

hamradio: baycom: make hdlcdrv_ops const

PATCH Applied Bhumika Goyal 2 participants 2 messages Aug 6, 2017 – Aug 7, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hamradio: baycom: make hdlcdrv_ops const

Make hdlcdrv_ops structures const as they are only passed to hdlcdrv_register function. The corresponding argument is of type const, so make the structures const.

---
 drivers/net/hamradio/baycom_par.c     | 2 +-
 drivers/net/hamradio/baycom_ser_fdx.c | 2 +-
 drivers/net/hamradio/baycom_ser_hdx.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/hamradio/baycom_par.c +1 -1
index 92b13b3..e178383 100644
@@ -386,7 +386,7 @@ static int baycom_ioctl(struct net_device *dev, struct ifreq *ifr,
 
 /* --------------------------------------------------------------------- */
 
-static struct hdlcdrv_ops par96_ops = {
+static const struct hdlcdrv_ops par96_ops = {
 	.drvname = bc_drvname,
 	.drvinfo = bc_drvinfo,
 	.open    = par96_open,
drivers/net/hamradio/baycom_ser_fdx.c +1 -1
index d9a646a..190f66c 100644
@@ -508,7 +508,7 @@ static int baycom_ioctl(struct net_device *dev, struct ifreq *ifr,
 
 /* --------------------------------------------------------------------- */
 
-static struct hdlcdrv_ops ser12_ops = {
+static const struct hdlcdrv_ops ser12_ops = {
 	.drvname = bc_drvname,
 	.drvinfo = bc_drvinfo,
 	.open    = ser12_open,
drivers/net/hamradio/baycom_ser_hdx.c +1 -1
index f1c8a9f..3c823c6 100644
@@ -542,7 +542,7 @@ static int baycom_ioctl(struct net_device *dev, struct ifreq *ifr,
 
 /* --------------------------------------------------------------------- */
 
-static struct hdlcdrv_ops ser12_ops = {
+static const struct hdlcdrv_ops ser12_ops = {
 	.drvname = bc_drvname,
 	.drvinfo = bc_drvinfo,
 	.open    = ser12_open,
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw

From: Bhumika Goyal <[email protected]>
Date: Sun, 6 Aug 2017 14:21:45 +0530

Quoted 5 lines

Make hdlcdrv_ops structures const as they are only passed to hdlcdrv_register function. The corresponding argument is of type const, so make the structures const.

Applied, thanks.