oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [frank-w-bpi-r2-4.14:6.5-dango-r4 7972/8003] drivers/nvmem/layouts/adtran.c:110:1: warning: the frame size of 1080 bytes is larger than 1024 bytes
@ 2023-08-12 15:27 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-08-12 15:27 UTC (permalink / raw)
  To: Frank Wunderlich; +Cc: oe-kbuild-all

tree:   https://github.com/frank-w/BPI-R2-4.14 6.5-dango-r4
head:   33ae06cdbe7cdded20d1ac549403343243272109
commit: cfdee1b77007e00f4a81c5acbe361ff0a43f34d1 [7972/8003] nvmem: add layout for Adtran devices
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20230812/202308122304.ncZiMYml-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230812/202308122304.ncZiMYml-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/202308122304.ncZiMYml-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/nvmem/layouts/adtran.c: In function 'adtran_add_cells':
>> drivers/nvmem/layouts/adtran.c:110:1: warning: the frame size of 1080 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     110 | }
         | ^


vim +110 drivers/nvmem/layouts/adtran.c

    44	
    45	static int adtran_add_cells(struct device *dev, struct nvmem_device *nvmem,
    46				     struct nvmem_layout *layout)
    47	{
    48		struct nvmem_cell_info info;
    49		struct device_node *layout_np;
    50		char mfginfo[1024], *c, *t, *p;
    51		int ret = -EINVAL;
    52	
    53		ret = nvmem_device_read(nvmem, 0, sizeof(mfginfo), mfginfo);
    54		if (ret < 0)
    55			return ret;
    56		else if (ret != sizeof(mfginfo))
    57			return -EIO;
    58	
    59		layout_np = of_nvmem_layout_get_container(nvmem);
    60		if (!layout_np)
    61			return -ENOENT;
    62	
    63		c = mfginfo;
    64		while (*c != 0xff) {
    65			memset(&info, 0, sizeof(info));
    66			if (*c == '#')
    67				goto nextline;
    68	
    69			t = strchr(c, '=');
    70			if (!t)
    71				goto nextline;
    72	
    73			*t = '\0';
    74			++t;
    75			info.offset = t - mfginfo;
    76			if (!strcmp(c, "MFG_MAC"))
    77				info.read_post_process = adtran_mac_address_pp;
    78	
    79			/* process variable name: convert to lower-case, '_' -> '-' */
    80			p = c;
    81			do {
    82				*p = tolower(*p);
    83				if (*p == '_')
    84					*p = '-';
    85			} while (*++p);
    86			info.name = c;
    87			c = strchr(t, 0xa); /* find newline */
    88			if (!c)
    89				break;
    90	
    91			info.bytes = c - t;
    92			info.np = of_get_child_by_name(layout_np, info.name);
    93			ret = nvmem_add_one_cell(nvmem, &info);
    94			if (ret)
    95				break;
    96	
    97			++c;
    98			continue;
    99	
   100	nextline:
   101			c = strchr(c, 0xa); /* find newline */
   102			if (!c)
   103				break;
   104			++c;
   105		}
   106	
   107		of_node_put(layout_np);
   108	
   109		return ret;
 > 110	}
   111	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-12 15:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-12 15:27 [frank-w-bpi-r2-4.14:6.5-dango-r4 7972/8003] drivers/nvmem/layouts/adtran.c:110:1: warning: the frame size of 1080 bytes is larger than 1024 bytes kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).