tree:
https://github.com/zen-kernel/zen-kernel 5.10/zen-sauce
head: b7b24b494b62e02c21a9a349da2d036849f9dd8b
commit: b81ab9b618d694217a54b5d2de70c7f37d3f3e07 [6/19] ZEN: Disable stack conservation
for GCC
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/zen-kernel/zen-kernel/commit/b81ab9b618d694217a54b5d2d...
git remote add zen-kernel-zen-kernel
https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.10/zen-sauce
git checkout b81ab9b618d694217a54b5d2de70c7f37d3f3e07
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/scsi/bfa/bfa_fcs_lport.c: In function
'bfa_fcs_lport_fdmi_build_rhba_pyld':
> drivers/scsi/bfa/bfa_fcs_lport.c:2152:1: warning: the frame size
of 1708 bytes is larger than 1024 bytes [-Wframe-larger-than=]
2152 | }
| ^
vim +2152 drivers/scsi/bfa/bfa_fcs_lport.c
a36c61f9025b892 Krishna Gudipati 2010-09-15 1898
a36c61f9025b892 Krishna Gudipati 2010-09-15 1899 static u16
a36c61f9025b892 Krishna Gudipati 2010-09-15 1900
bfa_fcs_lport_fdmi_build_rhba_pyld(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld)
a36c61f9025b892 Krishna Gudipati 2010-09-15 1901 {
a36c61f9025b892 Krishna Gudipati 2010-09-15 1902 struct bfa_fcs_lport_s *port =
fdmi->ms->port;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1903 struct bfa_fcs_fdmi_hba_attr_s
hba_attr;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1904 struct bfa_fcs_fdmi_hba_attr_s
*fcs_hba_attr = &hba_attr;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1905 struct fdmi_rhba_s *rhba = (struct
fdmi_rhba_s *) pyld;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1906 struct fdmi_attr_s *attr;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1907 u8 *curr_ptr;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1908 u16 len, count;
50444a340028119 Maggie 2010-11-29 1909 u16 templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1910
a36c61f9025b892 Krishna Gudipati 2010-09-15 1911 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 1912 * get hba attributes
a36c61f9025b892 Krishna Gudipati 2010-09-15 1913 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 1914 bfa_fcs_fdmi_get_hbaattr(fdmi,
fcs_hba_attr);
a36c61f9025b892 Krishna Gudipati 2010-09-15 1915
a36c61f9025b892 Krishna Gudipati 2010-09-15 1916 rhba->hba_id =
bfa_fcs_lport_get_pwwn(port);
ba816ea8e2eacbf Jing Huang 2010-10-18 1917 rhba->port_list.num_ports =
cpu_to_be32(1);
a36c61f9025b892 Krishna Gudipati 2010-09-15 1918 rhba->port_list.port_entry =
bfa_fcs_lport_get_pwwn(port);
a36c61f9025b892 Krishna Gudipati 2010-09-15 1919
a36c61f9025b892 Krishna Gudipati 2010-09-15 1920 len = sizeof(rhba->hba_id) +
sizeof(rhba->port_list);
a36c61f9025b892 Krishna Gudipati 2010-09-15 1921
a36c61f9025b892 Krishna Gudipati 2010-09-15 1922 count = 0;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1923 len +=
sizeof(rhba->hba_attr_blk.attr_count);
a36c61f9025b892 Krishna Gudipati 2010-09-15 1924
a36c61f9025b892 Krishna Gudipati 2010-09-15 1925 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 1926 * fill out the invididual entries
of the HBA attrib Block
a36c61f9025b892 Krishna Gudipati 2010-09-15 1927 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 1928 curr_ptr = (u8 *)
&rhba->hba_attr_blk.hba_attr;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1929
a36c61f9025b892 Krishna Gudipati 2010-09-15 1930 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 1931 * Node Name
a36c61f9025b892 Krishna Gudipati 2010-09-15 1932 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 1933 attr = (struct fdmi_attr_s *)
curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 1934 attr->type =
cpu_to_be16(FDMI_HBA_ATTRIB_NODENAME);
50444a340028119 Maggie 2010-11-29 1935 templen = sizeof(wwn_t);
50444a340028119 Maggie 2010-11-29 1936 memcpy(attr->value,
&bfa_fcs_lport_get_nwwn(port), templen);
50444a340028119 Maggie 2010-11-29 1937 curr_ptr += sizeof(attr->type) +
sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 1938 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1939 count++;
50444a340028119 Maggie 2010-11-29 1940 attr->len = cpu_to_be16(templen +
sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 1941 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 1942
a36c61f9025b892 Krishna Gudipati 2010-09-15 1943 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 1944 * Manufacturer
a36c61f9025b892 Krishna Gudipati 2010-09-15 1945 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 1946 attr = (struct fdmi_attr_s *)
curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 1947 attr->type =
cpu_to_be16(FDMI_HBA_ATTRIB_MANUFACTURER);
50444a340028119 Maggie 2010-11-29 1948 templen = (u16)
strlen(fcs_hba_attr->manufacturer);
50444a340028119 Maggie 2010-11-29 1949 memcpy(attr->value,
fcs_hba_attr->manufacturer, templen);
50444a340028119 Maggie 2010-11-29 1950 templen = fc_roundup(templen,
sizeof(u32));
50444a340028119 Maggie 2010-11-29 1951 curr_ptr += sizeof(attr->type) +
sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 1952 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1953 count++;
50444a340028119 Maggie 2010-11-29 1954 attr->len = cpu_to_be16(templen +
sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 1955 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 1956
a36c61f9025b892 Krishna Gudipati 2010-09-15 1957 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 1958 * Serial Number
a36c61f9025b892 Krishna Gudipati 2010-09-15 1959 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 1960 attr = (struct fdmi_attr_s *)
curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 1961 attr->type =
cpu_to_be16(FDMI_HBA_ATTRIB_SERIALNUM);
50444a340028119 Maggie 2010-11-29 1962 templen = (u16)
strlen(fcs_hba_attr->serial_num);
50444a340028119 Maggie 2010-11-29 1963 memcpy(attr->value,
fcs_hba_attr->serial_num, templen);
50444a340028119 Maggie 2010-11-29 1964 templen = fc_roundup(templen,
sizeof(u32));
50444a340028119 Maggie 2010-11-29 1965 curr_ptr += sizeof(attr->type) +
sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 1966 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1967 count++;
50444a340028119 Maggie 2010-11-29 1968 attr->len = cpu_to_be16(templen +
sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 1969 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 1970
a36c61f9025b892 Krishna Gudipati 2010-09-15 1971 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 1972 * Model
a36c61f9025b892 Krishna Gudipati 2010-09-15 1973 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 1974 attr = (struct fdmi_attr_s *)
curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 1975 attr->type =
cpu_to_be16(FDMI_HBA_ATTRIB_MODEL);
50444a340028119 Maggie 2010-11-29 1976 templen = (u16)
strlen(fcs_hba_attr->model);
50444a340028119 Maggie 2010-11-29 1977 memcpy(attr->value,
fcs_hba_attr->model, templen);
50444a340028119 Maggie 2010-11-29 1978 templen = fc_roundup(templen,
sizeof(u32));
50444a340028119 Maggie 2010-11-29 1979 curr_ptr += sizeof(attr->type) +
sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 1980 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1981 count++;
50444a340028119 Maggie 2010-11-29 1982 attr->len = cpu_to_be16(templen +
sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 1983 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 1984
a36c61f9025b892 Krishna Gudipati 2010-09-15 1985 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 1986 * Model Desc
a36c61f9025b892 Krishna Gudipati 2010-09-15 1987 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 1988 attr = (struct fdmi_attr_s *)
curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 1989 attr->type =
cpu_to_be16(FDMI_HBA_ATTRIB_MODEL_DESC);
50444a340028119 Maggie 2010-11-29 1990 templen = (u16)
strlen(fcs_hba_attr->model_desc);
50444a340028119 Maggie 2010-11-29 1991 memcpy(attr->value,
fcs_hba_attr->model_desc, templen);
50444a340028119 Maggie 2010-11-29 1992 templen = fc_roundup(templen,
sizeof(u32));
50444a340028119 Maggie 2010-11-29 1993 curr_ptr += sizeof(attr->type) +
sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 1994 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 1995 count++;
50444a340028119 Maggie 2010-11-29 1996 attr->len = cpu_to_be16(templen +
sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 1997 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 1998
a36c61f9025b892 Krishna Gudipati 2010-09-15 1999 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 2000 * H/W Version
a36c61f9025b892 Krishna Gudipati 2010-09-15 2001 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 2002 if (fcs_hba_attr->hw_version[0]
!= '\0') {
a36c61f9025b892 Krishna Gudipati 2010-09-15 2003 attr = (struct fdmi_attr_s *)
curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 2004 attr->type =
cpu_to_be16(FDMI_HBA_ATTRIB_HW_VERSION);
50444a340028119 Maggie 2010-11-29 2005 templen = (u16)
strlen(fcs_hba_attr->hw_version);
50444a340028119 Maggie 2010-11-29 2006 memcpy(attr->value,
fcs_hba_attr->hw_version, templen);
50444a340028119 Maggie 2010-11-29 2007 templen = fc_roundup(templen,
sizeof(u32));
50444a340028119 Maggie 2010-11-29 2008 curr_ptr += sizeof(attr->type) +
sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 2009 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 2010 count++;
50444a340028119 Maggie 2010-11-29 2011 attr->len = cpu_to_be16(templen
+ sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 2012 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 2013 }
a36c61f9025b892 Krishna Gudipati 2010-09-15 2014
a36c61f9025b892 Krishna Gudipati 2010-09-15 2015 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 2016 * Driver Version
a36c61f9025b892 Krishna Gudipati 2010-09-15 2017 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 2018 attr = (struct fdmi_attr_s *)
curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 2019 attr->type =
cpu_to_be16(FDMI_HBA_ATTRIB_DRIVER_VERSION);
50444a340028119 Maggie 2010-11-29 2020 templen = (u16)
strlen(fcs_hba_attr->driver_version);
50444a340028119 Maggie 2010-11-29 2021 memcpy(attr->value,
fcs_hba_attr->driver_version, templen);
50444a340028119 Maggie 2010-11-29 2022 templen = fc_roundup(templen,
sizeof(u32));
50444a340028119 Maggie 2010-11-29 2023 curr_ptr += sizeof(attr->type) +
sizeof(templen) + templen;
dd5aaf4536c5111 Krishna Gudipati 2011-06-13 2024 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 2025 count++;
50444a340028119 Maggie 2010-11-29 2026 attr->len = cpu_to_be16(templen +
sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 2027 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 2028
a36c61f9025b892 Krishna Gudipati 2010-09-15 2029 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 2030 * Option Rom Version
a36c61f9025b892 Krishna Gudipati 2010-09-15 2031 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 2032 if
(fcs_hba_attr->option_rom_ver[0] != '\0') {
a36c61f9025b892 Krishna Gudipati 2010-09-15 2033 attr = (struct fdmi_attr_s *)
curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 2034 attr->type =
cpu_to_be16(FDMI_HBA_ATTRIB_ROM_VERSION);
50444a340028119 Maggie 2010-11-29 2035 templen = (u16)
strlen(fcs_hba_attr->option_rom_ver);
50444a340028119 Maggie 2010-11-29 2036 memcpy(attr->value,
fcs_hba_attr->option_rom_ver, templen);
50444a340028119 Maggie 2010-11-29 2037 templen = fc_roundup(templen,
sizeof(u32));
50444a340028119 Maggie 2010-11-29 2038 curr_ptr += sizeof(attr->type) +
sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 2039 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 2040 count++;
50444a340028119 Maggie 2010-11-29 2041 attr->len = cpu_to_be16(templen
+ sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 2042 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 2043 }
a36c61f9025b892 Krishna Gudipati 2010-09-15 2044
a36c61f9025b892 Krishna Gudipati 2010-09-15 2045 attr = (struct fdmi_attr_s *)
curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 2046 attr->type =
cpu_to_be16(FDMI_HBA_ATTRIB_FW_VERSION);
b480a32e69b7b3c Krishna Gudipati 2012-09-21 2047 templen = (u16)
strlen(fcs_hba_attr->fw_version);
b480a32e69b7b3c Krishna Gudipati 2012-09-21 2048 memcpy(attr->value,
fcs_hba_attr->fw_version, templen);
50444a340028119 Maggie 2010-11-29 2049 templen = fc_roundup(templen,
sizeof(u32));
50444a340028119 Maggie 2010-11-29 2050 curr_ptr += sizeof(attr->type) +
sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 2051 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 2052 count++;
50444a340028119 Maggie 2010-11-29 2053 attr->len = cpu_to_be16(templen +
sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 2054 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 2055
a36c61f9025b892 Krishna Gudipati 2010-09-15 2056 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 2057 * OS Name
a36c61f9025b892 Krishna Gudipati 2010-09-15 2058 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 2059 if (fcs_hba_attr->os_name[0] !=
'\0') {
a36c61f9025b892 Krishna Gudipati 2010-09-15 2060 attr = (struct fdmi_attr_s *)
curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 2061 attr->type =
cpu_to_be16(FDMI_HBA_ATTRIB_OS_NAME);
50444a340028119 Maggie 2010-11-29 2062 templen = (u16)
strlen(fcs_hba_attr->os_name);
50444a340028119 Maggie 2010-11-29 2063 memcpy(attr->value,
fcs_hba_attr->os_name, templen);
50444a340028119 Maggie 2010-11-29 2064 templen = fc_roundup(templen,
sizeof(u32));
50444a340028119 Maggie 2010-11-29 2065 curr_ptr += sizeof(attr->type) +
sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 2066 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 2067 count++;
50444a340028119 Maggie 2010-11-29 2068 attr->len = cpu_to_be16(templen
+ sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 2069 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 2070 }
a36c61f9025b892 Krishna Gudipati 2010-09-15 2071
a36c61f9025b892 Krishna Gudipati 2010-09-15 2072 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 2073 * MAX_CT_PAYLOAD
a36c61f9025b892 Krishna Gudipati 2010-09-15 2074 */
a36c61f9025b892 Krishna Gudipati 2010-09-15 2075 attr = (struct fdmi_attr_s *)
curr_ptr;
ba816ea8e2eacbf Jing Huang 2010-10-18 2076 attr->type =
cpu_to_be16(FDMI_HBA_ATTRIB_MAX_CT);
50444a340028119 Maggie 2010-11-29 2077 templen =
sizeof(fcs_hba_attr->max_ct_pyld);
50444a340028119 Maggie 2010-11-29 2078 memcpy(attr->value,
&fcs_hba_attr->max_ct_pyld, templen);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2079 templen = fc_roundup(templen,
sizeof(u32));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2080 curr_ptr += sizeof(attr->type) +
sizeof(templen) + templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2081 len += templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2082 count++;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2083 attr->len = cpu_to_be16(templen +
sizeof(attr->type) +
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2084 sizeof(templen));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2085 /*
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2086 * Send extended attributes ( FOS
7.1 support )
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2087 */
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2088 if (fdmi->retry_cnt == 0) {
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2089 attr = (struct fdmi_attr_s *)
curr_ptr;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2090 attr->type =
cpu_to_be16(FDMI_HBA_ATTRIB_NODE_SYM_NAME);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2091 templen =
sizeof(fcs_hba_attr->node_sym_name);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2092 memcpy(attr->value,
&fcs_hba_attr->node_sym_name, templen);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2093 templen = fc_roundup(templen,
sizeof(u32));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2094 curr_ptr += sizeof(attr->type) +
sizeof(templen) + templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2095 len += templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2096 count++;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2097 attr->len = cpu_to_be16(templen
+ sizeof(attr->type) +
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2098 sizeof(templen));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2099
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2100 attr = (struct fdmi_attr_s *)
curr_ptr;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2101 attr->type =
cpu_to_be16(FDMI_HBA_ATTRIB_VENDOR_ID);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2102 templen =
sizeof(fcs_hba_attr->vendor_info);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2103 memcpy(attr->value,
&fcs_hba_attr->vendor_info, templen);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2104 templen = fc_roundup(templen,
sizeof(u32));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2105 curr_ptr += sizeof(attr->type) +
sizeof(templen) + templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2106 len += templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2107 count++;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2108 attr->len = cpu_to_be16(templen
+ sizeof(attr->type) +
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2109 sizeof(templen));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2110
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2111 attr = (struct fdmi_attr_s *)
curr_ptr;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2112 attr->type =
cpu_to_be16(FDMI_HBA_ATTRIB_NUM_PORTS);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2113 templen =
sizeof(fcs_hba_attr->num_ports);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2114 memcpy(attr->value,
&fcs_hba_attr->num_ports, templen);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2115 templen = fc_roundup(templen,
sizeof(u32));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2116 curr_ptr += sizeof(attr->type) +
sizeof(templen) + templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2117 len += templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2118 count++;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2119 attr->len = cpu_to_be16(templen
+ sizeof(attr->type) +
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2120 sizeof(templen));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2121
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2122 attr = (struct fdmi_attr_s *)
curr_ptr;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2123 attr->type =
cpu_to_be16(FDMI_HBA_ATTRIB_FABRIC_NAME);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2124 templen =
sizeof(fcs_hba_attr->fabric_name);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2125 memcpy(attr->value,
&fcs_hba_attr->fabric_name, templen);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2126 templen = fc_roundup(templen,
sizeof(u32));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2127 curr_ptr += sizeof(attr->type) +
sizeof(templen) + templen;
50444a340028119 Maggie 2010-11-29 2128 len += templen;
a36c61f9025b892 Krishna Gudipati 2010-09-15 2129 count++;
50444a340028119 Maggie 2010-11-29 2130 attr->len = cpu_to_be16(templen
+ sizeof(attr->type) +
50444a340028119 Maggie 2010-11-29 2131 sizeof(templen));
a36c61f9025b892 Krishna Gudipati 2010-09-15 2132
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2133 attr = (struct fdmi_attr_s *)
curr_ptr;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2134 attr->type =
cpu_to_be16(FDMI_HBA_ATTRIB_BIOS_VER);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2135 templen =
sizeof(fcs_hba_attr->bios_ver);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2136 memcpy(attr->value,
&fcs_hba_attr->bios_ver, templen);
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2137 templen = fc_roundup(attr->len,
sizeof(u32));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2138 curr_ptr += sizeof(attr->type) +
sizeof(templen) + templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2139 len += templen;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2140 count++;
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2141 attr->len = cpu_to_be16(templen
+ sizeof(attr->type) +
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2142 sizeof(templen));
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2143 }
d7cbc3044f2b288 Vijaya Mohan Guvva 2013-05-13 2144
a36c61f9025b892 Krishna Gudipati 2010-09-15 2145 /*
a36c61f9025b892 Krishna Gudipati 2010-09-15 2146 * Update size of payload
a36c61f9025b892 Krishna Gudipati 2010-09-15 2147 */
5fbe25c7a664601 Jing Huang 2010-10-18 2148 len += ((sizeof(attr->type) +
sizeof(attr->len)) * count);
a36c61f9025b892 Krishna Gudipati 2010-09-15 2149
ba816ea8e2eacbf Jing Huang 2010-10-18 2150 rhba->hba_attr_blk.attr_count =
cpu_to_be32(count);
a36c61f9025b892 Krishna Gudipati 2010-09-15 2151 return len;
a36c61f9025b892 Krishna Gudipati 2010-09-15 @2152 }
a36c61f9025b892 Krishna Gudipati 2010-09-15 2153
:::::: The code at line 2152 was first introduced by commit
:::::: a36c61f9025b8924f99f54d518763bee7aa84085 [SCSI] bfa: cleanup driver
:::::: TO: Krishna Gudipati <kgudipat(a)brocade.com>
:::::: CC: James Bottomley <James.Bottomley(a)suse.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org