From: kernel test robot <lkp@intel.com>
To: Robert Winkler <rwinkler@internships.antmicro.com>
Cc: oe-kbuild-all@lists.linux.dev, Gabriel Somlo <gsomlo@gmail.com>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [litex-hub:litex-rebase 7/15] drivers/i2c/busses/i2c-litex.c:119:9: error: implicit declaration of function 'strncpy'
Date: Tue, 23 Jun 2026 18:25:13 +0800 [thread overview]
Message-ID: <202606231855.ipMEmMUU-lkp@intel.com> (raw)
tree: https://github.com/litex-hub/linux litex-rebase
head: c13bee0670f8bcfe9e289c42a42a551462e8c5df
commit: 0feffc97be8ca96055d732a53f8946c9eccb3527 [7/15] LiteX: driver for I2CMaster
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20260623/202606231855.ipMEmMUU-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260623/202606231855.ipMEmMUU-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606231855.ipMEmMUU-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/i2c/busses/i2c-litex.c: In function 'litex_i2c_probe':
>> drivers/i2c/busses/i2c-litex.c:119:9: error: implicit declaration of function 'strncpy' [-Wimplicit-function-declaration]
119 | strncpy(i2c_s->adapter.name, "litex_i2c_adapter",
| ^~~~~~~
drivers/i2c/busses/i2c-litex.c:26:1: note: 'strncpy' is defined in header '<string.h>'; this is probably fixable by adding '#include <string.h>'
25 | #include <linux/litex.h>
+++ |+#include <string.h>
26 |
vim +/strncpy +119 drivers/i2c/busses/i2c-litex.c
93
94 static int litex_i2c_probe(struct platform_device *pdev)
95 {
96 struct device_node *node = pdev->dev.of_node;
97 void __iomem *membase;
98 struct litex_i2c *i2c_s;
99 struct resource *res;
100
101 if (!node)
102 return -ENODEV;
103
104 i2c_s = devm_kzalloc(&pdev->dev, sizeof(*i2c_s), GFP_KERNEL);
105 if (!i2c_s)
106 return -ENOMEM;
107
108 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
109 if (!res)
110 return -EBUSY;
111
112 membase = devm_of_iomap(&pdev->dev, node, 0, &res->end);
113 if (IS_ERR_OR_NULL(membase))
114 return -EIO;
115
116 i2c_s->reg_w = membase + OFFSET_REG_W;
117 i2c_s->reg_r = membase + OFFSET_REG_R;
118
> 119 strncpy(i2c_s->adapter.name, "litex_i2c_adapter",
120 sizeof(i2c_s->adapter.name));
121 i2c_s->adapter.owner = THIS_MODULE;
122 i2c_s->adapter.algo_data = &i2c_s->algo_data;
123 i2c_s->adapter.dev.parent = &pdev->dev;
124 i2c_s->adapter.dev.of_node = node;
125 i2c_s->algo_data.data = i2c_s;
126
127 i2c_s->algo_data.setsda = litex_i2c_setsda;
128 i2c_s->algo_data.setscl = litex_i2c_setscl;
129 i2c_s->algo_data.getsda = litex_i2c_getsda;
130 i2c_s->algo_data.getscl = NULL;
131 i2c_s->algo_data.udelay = DRIVER_ALGO_BIT_UDELAY;
132 i2c_s->algo_data.timeout = HZ;
133
134 platform_set_drvdata(pdev, i2c_s);
135 return i2c_bit_add_bus(&i2c_s->adapter);
136 }
137
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-06-23 10:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202606231855.ipMEmMUU-lkp@intel.com \
--to=lkp@intel.com \
--cc=geert@linux-m68k.org \
--cc=gsomlo@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rwinkler@internships.antmicro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.