constify rio_device_id
cover constify rio_device_id
rio_device_id are not supposed to change at runtime. rio driver is working with const 'id_table'. So mark the non-const rio_device_id structs as const.
Arvind Yadav (5):
[PATCH 1/5] rapidio: idt_gen2: constify rio_device_id [PATCH 2/5] rapidio: idt_gen3: constify rio_device_id [PATCH 3/5] rapidio: idtcps: constify rio_device_id [PATCH 4/5] rapidio: tsi568: constify rio_device_id [PATCH 5/5] rapidio: tsi57x: constify rio_device_id
drivers/rapidio/switches/idt_gen2.c | 2 +- drivers/rapidio/switches/idt_gen3.c | 2 +- drivers/rapidio/switches/idtcps.c | 2 +- drivers/rapidio/switches/tsi568.c | 2 +- drivers/rapidio/switches/tsi57x.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/5 rapidio: idt_gen2: constify rio_device_id
rio_device_id are not supposed to change at runtime. rio driver is working with const 'id_table'. So mark the non-const rio_device_id structs as const.
--- drivers/rapidio/switches/idt_gen2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rapidio/switches/idt_gen2.c +1 -1
@@ -458,7 +458,7 @@ static void idtg2_remove(struct rio_dev *rdev)idtg2_sysfs (rdev, false); } -static struct rio_device_id idtg2_id_table[] = { +static const struct rio_device_id idtg2_id_table[] = { {RIO_DEVICE (RIO_DID_IDTCPS1848 ,RIO_VID_IDT )}, {RIO_DEVICE (RIO_DID_IDTCPS1616 ,RIO_VID_IDT )}, {RIO_DEVICE (RIO_DID_IDTVPS1616 ,RIO_VID_IDT )},
Signature · 1 line
2.7.4
PATCH 2/5 rapidio: idt_gen3: constify rio_device_id
In reply to Arvind Yadavrio_device_id are not supposed to change at runtime. rio driver is working with const 'id_table'. So mark the non-const rio_device_id structs as const.
--- drivers/rapidio/switches/idt_gen3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rapidio/switches/idt_gen3.c +1 -1
@@ -348,7 +348,7 @@ static void idtg3_shutdown(struct rio_dev *rdev) } } -static struct rio_device_id idtg3_id_table[] = { +static const struct rio_device_id idtg3_id_table[] = { {RIO_DEVICE (RIO_DID_IDTRXS1632 ,RIO_VID_IDT )}, {RIO_DEVICE (RIO_DID_IDTRXS2448 ,RIO_VID_IDT )}, {0 , }/* terminate list */
Signature · 1 line
2.7.4
PATCH 3/5 rapidio: idtcps: constify rio_device_id
In reply to Arvind Yadavrio_device_id are not supposed to change at runtime. rio driver is working with const 'id_table'. So mark the non-const rio_device_id structs as const.
--- drivers/rapidio/switches/idtcps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rapidio/switches/idtcps.c +1 -1
@@ -168,7 +168,7 @@ static void idtcps_remove(struct rio_dev *rdev)spin_unlock (&rdev->rswitch->lock); } -static struct rio_device_id idtcps_id_table[] = { +static const struct rio_device_id idtcps_id_table[] = { {RIO_DEVICE (RIO_DID_IDTCPS6Q ,RIO_VID_IDT )}, {RIO_DEVICE (RIO_DID_IDTCPS8 ,RIO_VID_IDT )}, {RIO_DEVICE (RIO_DID_IDTCPS10Q ,RIO_VID_IDT )},
Signature · 1 line
2.7.4
PATCH 4/5 rapidio: tsi568: constify rio_device_id
In reply to Arvind Yadavrio_device_id are not supposed to change at runtime. rio driver is working with const 'id_table'. So mark the non-const rio_device_id structs as const.
--- drivers/rapidio/switches/tsi568.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rapidio/switches/tsi568.c +1 -1
@@ -169,7 +169,7 @@ static void tsi568_remove(struct rio_dev *rdev)spin_unlock (&rdev->rswitch->lock); } -static struct rio_device_id tsi568_id_table[] = { +static const struct rio_device_id tsi568_id_table[] = { {RIO_DEVICE (RIO_DID_TSI568 ,RIO_VID_TUNDRA )}, {0 , }/* terminate list */ };
Signature · 1 line
2.7.4
PATCH 5/5 rapidio: tsi57x: constify rio_device_id
In reply to Arvind Yadavrio_device_id are not supposed to change at runtime. rio driver is working with const 'id_table'. So mark the non-const rio_device_id structs as const.
--- drivers/rapidio/switches/tsi57x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rapidio/switches/tsi57x.c +1 -1
@@ -336,7 +336,7 @@ static void tsi57x_remove(struct rio_dev *rdev)spin_unlock (&rdev->rswitch->lock); } -static struct rio_device_id tsi57x_id_table[] = { +static const struct rio_device_id tsi57x_id_table[] = { {RIO_DEVICE (RIO_DID_TSI572 ,RIO_VID_TUNDRA )}, {RIO_DEVICE (RIO_DID_TSI574 ,RIO_VID_TUNDRA )}, {RIO_DEVICE (RIO_DID_TSI577 ,RIO_VID_TUNDRA )},
Signature · 1 line
2.7.4
Hi Andrew,
Please apply the patches listed below. I will forward them to you.
Thank you,
Alex.
-----Original Message-----
From: Arvind Yadav [mailto:[email protected]]
Sent: Saturday, August 26, 2017 4:04 AM
To: [email protected]; Bounine, Alexandre <[email protected]>
Cc: [email protected]
Subject: [PATCH 0/5] constify rio_device_id
rio_device_id are not supposed to change at runtime. rio driver is working with const 'id_table'. So mark the non-const rio_device_id structs as const.
Arvind Yadav (5):
[PATCH 1/5] rapidio: idt_gen2: constify rio_device_id [PATCH 2/5] rapidio: idt_gen3: constify rio_device_id [PATCH 3/5] rapidio: idtcps: constify rio_device_id [PATCH 4/5] rapidio: tsi568: constify rio_device_id [PATCH 5/5] rapidio: tsi57x: constify rio_device_id
drivers/rapidio/switches/idt_gen2.c | 2 +- drivers/rapidio/switches/idt_gen3.c | 2 +- drivers/rapidio/switches/idtcps.c | 2 +- drivers/rapidio/switches/tsi568.c | 2 +- drivers/rapidio/switches/tsi57x.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
2.7.4
Quoted 5 lines · Alexandre
Hi Andrew,
Please apply the patches listed below. I will forward them to you.
I'm subscribed to linux-kernel so the extra forwardings weren't needed, thanks.
I'm thinking we might as well fold all these into a single patch, save a few electrons?
Yes, single patch makes sense.
-----Original Message-----
From: Andrew Morton [mailto:[email protected]]
Sent: Monday, September 25, 2017 7:14 PM
To: Bounine, Alexandre <[email protected]>
Cc: [email protected]; [email protected]; Arvind Yadav <[email protected]>
Subject: Re: [PATCH 0/5] constify rio_device_id
Quoted 5 lines · Alexandre
Hi Andrew,
Please apply the patches listed below. I will forward them to you.
I'm subscribed to linux-kernel so the extra forwardings weren't needed, thanks.
I'm thinking we might as well fold all these into a single patch, save a few electrons?