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 |
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
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 --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] =
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(-)