diff mbox series

[v1,1/2] i2c: designware: constify abort_sources

Message ID 20240122033108.31053-1-raag.jadav@intel.com
State Accepted
Delegated to: Andi Shyti
Headers show
Series [v1,1/2] i2c: designware: constify abort_sources | expand

Commit Message

Raag Jadav Jan. 22, 2024, 3:31 a.m. UTC
We never modify abort_sources, mark it as const.

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
---
 drivers/i2c/busses/i2c-designware-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andi Shyti Oct. 2, 2024, 9:18 a.m. UTC | #1
Hi Raag,

On Mon, Jan 22, 2024 at 09:01:07AM GMT, Raag Jadav wrote:
> We never modify abort_sources, mark it as const.
> 
> Signed-off-by: Raag Jadav <raag.jadav@intel.com>

we meet in a different context :-)

Sorry I have missed this patch. I applied it to i2c/i2c-host. The
second patch was already sent here 21ac0359f72a90.

Thanks,
Andi
Raag Jadav Oct. 3, 2024, 2:58 a.m. UTC | #2
On Wed, Oct 02, 2024 at 11:18:34AM +0200, Andi Shyti wrote:
> Hi Raag,
> 
> On Mon, Jan 22, 2024 at 09:01:07AM GMT, Raag Jadav wrote:
> > We never modify abort_sources, mark it as const.
> > 
> > Signed-off-by: Raag Jadav <raag.jadav@intel.com>
> 
> we meet in a different context :-)

Small world :)

> Sorry I have missed this patch. I applied it to i2c/i2c-host. The
> second patch was already sent here 21ac0359f72a90.

Awesome.

Raag
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c
index affcfb243f0f..39c956b0a72d 100644
--- a/drivers/i2c/busses/i2c-designware-common.c
+++ b/drivers/i2c/busses/i2c-designware-common.c
@@ -28,7 +28,7 @@ 
 
 #include "i2c-designware-core.h"
 
-static char *abort_sources[] = {
+static const char *const abort_sources[] = {
 	[ABRT_7B_ADDR_NOACK] =
 		"slave address not acknowledged (7bit mode)",
 	[ABRT_10ADDR1_NOACK] =