[intel-lts:4.19/android_s 15930/25248] drivers/pwm/pwm-stm32-lp.c:63:41: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'u64' {aka 'long long unsigned int'}
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 4.19/android_s
head: d47c20847da6957c8b15960571893193936c8c1e
commit: d892c9f3571faa2e691fc3a9eb6ea4f4da1d7eab [15930/25248] ANDROID: GKI: pwm: core: Add option to config PWM duty/period with u64 data length
config: mips-randconfig-r016-20211028 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 11.2.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/intel/linux-intel-lts/commit/d892c9f3571faa2e691fc3a9e...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 4.19/android_s
git checkout d892c9f3571faa2e691fc3a9eb6ea4f4da1d7eab
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=mips
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 >>):
In file included from include/linux/printk.h:336,
from include/linux/kernel.h:14,
from include/linux/clk.h:16,
from include/linux/mfd/stm32-lptimer.h:12,
from drivers/pwm/pwm-stm32-lp.c:13:
drivers/pwm/pwm-stm32-lp.c: In function 'stm32_pwm_lp_apply':
>> drivers/pwm/pwm-stm32-lp.c:63:41: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'u64' {aka 'long long unsigned int'} [-Wformat=]
63 | dev_dbg(priv->chip.dev, "Can't reach %u ns\n", state->period);
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:135:53: note: in definition of macro 'dynamic_dev_dbg'
135 | __dynamic_dev_dbg(&descriptor, dev, fmt, \
| ^~~
include/linux/device.h:1519:30: note: in expansion of macro 'dev_fmt'
1519 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/pwm/pwm-stm32-lp.c:63:17: note: in expansion of macro 'dev_dbg'
63 | dev_dbg(priv->chip.dev, "Can't reach %u ns\n", state->period);
| ^~~~~~~
drivers/pwm/pwm-stm32-lp.c:63:55: note: format string is defined here
63 | dev_dbg(priv->chip.dev, "Can't reach %u ns\n", state->period);
| ~^
| |
| unsigned int
| %llu
vim +63 drivers/pwm/pwm-stm32-lp.c
e70a540b4e0230 Fabrice Gasnier 2017-08-28 32
e70a540b4e0230 Fabrice Gasnier 2017-08-28 33 static int stm32_pwm_lp_apply(struct pwm_chip *chip, struct pwm_device *pwm,
e70a540b4e0230 Fabrice Gasnier 2017-08-28 34 struct pwm_state *state)
e70a540b4e0230 Fabrice Gasnier 2017-08-28 35 {
e70a540b4e0230 Fabrice Gasnier 2017-08-28 36 struct stm32_pwm_lp *priv = to_stm32_pwm_lp(chip);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 37 unsigned long long prd, div, dty;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 38 struct pwm_state cstate;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 39 u32 val, mask, cfgr, presc = 0;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 40 bool reenable;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 41 int ret;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 42
e70a540b4e0230 Fabrice Gasnier 2017-08-28 43 pwm_get_state(pwm, &cstate);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 44 reenable = !cstate.enabled;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 45
e70a540b4e0230 Fabrice Gasnier 2017-08-28 46 if (!state->enabled) {
e70a540b4e0230 Fabrice Gasnier 2017-08-28 47 if (cstate.enabled) {
e70a540b4e0230 Fabrice Gasnier 2017-08-28 48 /* Disable LP timer */
e70a540b4e0230 Fabrice Gasnier 2017-08-28 49 ret = regmap_write(priv->regmap, STM32_LPTIM_CR, 0);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 50 if (ret)
e70a540b4e0230 Fabrice Gasnier 2017-08-28 51 return ret;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 52 /* disable clock to PWM counter */
e70a540b4e0230 Fabrice Gasnier 2017-08-28 53 clk_disable(priv->clk);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 54 }
e70a540b4e0230 Fabrice Gasnier 2017-08-28 55 return 0;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 56 }
e70a540b4e0230 Fabrice Gasnier 2017-08-28 57
e70a540b4e0230 Fabrice Gasnier 2017-08-28 58 /* Calculate the period and prescaler value */
e70a540b4e0230 Fabrice Gasnier 2017-08-28 59 div = (unsigned long long)clk_get_rate(priv->clk) * state->period;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 60 do_div(div, NSEC_PER_SEC);
65348659535d23 Fabrice Gasnier 2019-09-18 61 if (!div) {
65348659535d23 Fabrice Gasnier 2019-09-18 62 /* Clock is too slow to achieve requested period. */
65348659535d23 Fabrice Gasnier 2019-09-18 @63 dev_dbg(priv->chip.dev, "Can't reach %u ns\n", state->period);
65348659535d23 Fabrice Gasnier 2019-09-18 64 return -EINVAL;
65348659535d23 Fabrice Gasnier 2019-09-18 65 }
65348659535d23 Fabrice Gasnier 2019-09-18 66
e70a540b4e0230 Fabrice Gasnier 2017-08-28 67 prd = div;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 68 while (div > STM32_LPTIM_MAX_ARR) {
e70a540b4e0230 Fabrice Gasnier 2017-08-28 69 presc++;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 70 if ((1 << presc) > STM32_LPTIM_MAX_PRESCALER) {
e70a540b4e0230 Fabrice Gasnier 2017-08-28 71 dev_err(priv->chip.dev, "max prescaler exceeded\n");
e70a540b4e0230 Fabrice Gasnier 2017-08-28 72 return -EINVAL;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 73 }
e70a540b4e0230 Fabrice Gasnier 2017-08-28 74 div = prd >> presc;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 75 }
e70a540b4e0230 Fabrice Gasnier 2017-08-28 76 prd = div;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 77
e70a540b4e0230 Fabrice Gasnier 2017-08-28 78 /* Calculate the duty cycle */
e70a540b4e0230 Fabrice Gasnier 2017-08-28 79 dty = prd * state->duty_cycle;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 80 do_div(dty, state->period);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 81
e70a540b4e0230 Fabrice Gasnier 2017-08-28 82 if (!cstate.enabled) {
e70a540b4e0230 Fabrice Gasnier 2017-08-28 83 /* enable clock to drive PWM counter */
e70a540b4e0230 Fabrice Gasnier 2017-08-28 84 ret = clk_enable(priv->clk);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 85 if (ret)
e70a540b4e0230 Fabrice Gasnier 2017-08-28 86 return ret;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 87 }
e70a540b4e0230 Fabrice Gasnier 2017-08-28 88
e70a540b4e0230 Fabrice Gasnier 2017-08-28 89 ret = regmap_read(priv->regmap, STM32_LPTIM_CFGR, &cfgr);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 90 if (ret)
e70a540b4e0230 Fabrice Gasnier 2017-08-28 91 goto err;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 92
e70a540b4e0230 Fabrice Gasnier 2017-08-28 93 if ((FIELD_GET(STM32_LPTIM_PRESC, cfgr) != presc) ||
e70a540b4e0230 Fabrice Gasnier 2017-08-28 94 (FIELD_GET(STM32_LPTIM_WAVPOL, cfgr) != state->polarity)) {
e70a540b4e0230 Fabrice Gasnier 2017-08-28 95 val = FIELD_PREP(STM32_LPTIM_PRESC, presc);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 96 val |= FIELD_PREP(STM32_LPTIM_WAVPOL, state->polarity);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 97 mask = STM32_LPTIM_PRESC | STM32_LPTIM_WAVPOL;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 98
e70a540b4e0230 Fabrice Gasnier 2017-08-28 99 /* Must disable LP timer to modify CFGR */
e70a540b4e0230 Fabrice Gasnier 2017-08-28 100 reenable = true;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 101 ret = regmap_write(priv->regmap, STM32_LPTIM_CR, 0);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 102 if (ret)
e70a540b4e0230 Fabrice Gasnier 2017-08-28 103 goto err;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 104
e70a540b4e0230 Fabrice Gasnier 2017-08-28 105 ret = regmap_update_bits(priv->regmap, STM32_LPTIM_CFGR, mask,
e70a540b4e0230 Fabrice Gasnier 2017-08-28 106 val);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 107 if (ret)
e70a540b4e0230 Fabrice Gasnier 2017-08-28 108 goto err;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 109 }
e70a540b4e0230 Fabrice Gasnier 2017-08-28 110
e70a540b4e0230 Fabrice Gasnier 2017-08-28 111 if (reenable) {
e70a540b4e0230 Fabrice Gasnier 2017-08-28 112 /* Must (re)enable LP timer to modify CMP & ARR */
e70a540b4e0230 Fabrice Gasnier 2017-08-28 113 ret = regmap_write(priv->regmap, STM32_LPTIM_CR,
e70a540b4e0230 Fabrice Gasnier 2017-08-28 114 STM32_LPTIM_ENABLE);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 115 if (ret)
e70a540b4e0230 Fabrice Gasnier 2017-08-28 116 goto err;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 117 }
e70a540b4e0230 Fabrice Gasnier 2017-08-28 118
e70a540b4e0230 Fabrice Gasnier 2017-08-28 119 ret = regmap_write(priv->regmap, STM32_LPTIM_ARR, prd - 1);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 120 if (ret)
e70a540b4e0230 Fabrice Gasnier 2017-08-28 121 goto err;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 122
e70a540b4e0230 Fabrice Gasnier 2017-08-28 123 ret = regmap_write(priv->regmap, STM32_LPTIM_CMP, prd - (1 + dty));
e70a540b4e0230 Fabrice Gasnier 2017-08-28 124 if (ret)
e70a540b4e0230 Fabrice Gasnier 2017-08-28 125 goto err;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 126
e70a540b4e0230 Fabrice Gasnier 2017-08-28 127 /* ensure CMP & ARR registers are properly written */
e70a540b4e0230 Fabrice Gasnier 2017-08-28 128 ret = regmap_read_poll_timeout(priv->regmap, STM32_LPTIM_ISR, val,
e70a540b4e0230 Fabrice Gasnier 2017-08-28 129 (val & STM32_LPTIM_CMPOK_ARROK),
e70a540b4e0230 Fabrice Gasnier 2017-08-28 130 100, 1000);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 131 if (ret) {
e70a540b4e0230 Fabrice Gasnier 2017-08-28 132 dev_err(priv->chip.dev, "ARR/CMP registers write issue\n");
e70a540b4e0230 Fabrice Gasnier 2017-08-28 133 goto err;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 134 }
e70a540b4e0230 Fabrice Gasnier 2017-08-28 135 ret = regmap_write(priv->regmap, STM32_LPTIM_ICR,
e70a540b4e0230 Fabrice Gasnier 2017-08-28 136 STM32_LPTIM_CMPOKCF_ARROKCF);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 137 if (ret)
e70a540b4e0230 Fabrice Gasnier 2017-08-28 138 goto err;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 139
e70a540b4e0230 Fabrice Gasnier 2017-08-28 140 if (reenable) {
e70a540b4e0230 Fabrice Gasnier 2017-08-28 141 /* Start LP timer in continuous mode */
e70a540b4e0230 Fabrice Gasnier 2017-08-28 142 ret = regmap_update_bits(priv->regmap, STM32_LPTIM_CR,
e70a540b4e0230 Fabrice Gasnier 2017-08-28 143 STM32_LPTIM_CNTSTRT,
e70a540b4e0230 Fabrice Gasnier 2017-08-28 144 STM32_LPTIM_CNTSTRT);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 145 if (ret) {
e70a540b4e0230 Fabrice Gasnier 2017-08-28 146 regmap_write(priv->regmap, STM32_LPTIM_CR, 0);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 147 goto err;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 148 }
e70a540b4e0230 Fabrice Gasnier 2017-08-28 149 }
e70a540b4e0230 Fabrice Gasnier 2017-08-28 150
e70a540b4e0230 Fabrice Gasnier 2017-08-28 151 return 0;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 152 err:
e70a540b4e0230 Fabrice Gasnier 2017-08-28 153 if (!cstate.enabled)
e70a540b4e0230 Fabrice Gasnier 2017-08-28 154 clk_disable(priv->clk);
e70a540b4e0230 Fabrice Gasnier 2017-08-28 155
e70a540b4e0230 Fabrice Gasnier 2017-08-28 156 return ret;
e70a540b4e0230 Fabrice Gasnier 2017-08-28 157 }
e70a540b4e0230 Fabrice Gasnier 2017-08-28 158
:::::: The code at line 63 was first introduced by commit
:::::: 65348659535d23e6fb7a79aa9d54332479cf980e pwm: stm32-lp: Add check in case requested period cannot be achieved
:::::: TO: Fabrice Gasnier <fabrice.gasnier(a)st.com>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 2 weeks
[oracle-dtrace:v1/5.15 30/35] net/ipv6/ip6_output.c:69:21: warning: variable 'dropreason' set but not used
by kernel test robot
tree: https://github.com/oracle/dtrace-linux-kernel v1/5.15
head: 0fee66d7ce96317146609675767971d0f35c3e74
commit: 7ed2333cfd691c676b0adfe951d92244f1ef5128 [30/35] dtrace: add SDT probes
config: csky-defconfig (attached as .config)
compiler: csky-linux-gcc (GCC) 11.2.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/oracle/dtrace-linux-kernel/commit/7ed2333cfd691c676b0a...
git remote add oracle-dtrace https://github.com/oracle/dtrace-linux-kernel
git fetch --no-tags oracle-dtrace v1/5.15
git checkout 7ed2333cfd691c676b0adfe951d92244f1ef5128
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=csky
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 >>):
net/ipv6/ip6_output.c: In function 'ip6_finish_output2':
>> net/ipv6/ip6_output.c:69:21: warning: variable 'dropreason' set but not used [-Wunused-but-set-variable]
69 | const char *dropreason;
| ^~~~~~~~~~
net/ipv6/ip6_output.c: In function 'ip6_xmit':
net/ipv6/ip6_output.c:291:21: warning: variable 'dropreason' set but not used [-Wunused-but-set-variable]
291 | const char *dropreason;
| ^~~~~~~~~~
net/ipv6/ip6_output.c: In function 'ip6_forward':
>> net/ipv6/ip6_output.c:536:13: warning: variable 'err' set but not used [-Wunused-but-set-variable]
536 | int err = -EINVAL;
| ^~~
net/ipv6/ip6_output.c:535:21: warning: variable 'dropreason' set but not used [-Wunused-but-set-variable]
535 | const char *dropreason;
| ^~~~~~~~~~
net/ipv6/ip6_output.c: In function '__ip6_append_data':
net/ipv6/ip6_output.c:1547:21: warning: variable 'dropreason' set but not used [-Wunused-but-set-variable]
1547 | const char *dropreason;
| ^~~~~~~~~~
--
net/ipv6/ip6_input.c: In function 'ip6_rcv_core':
>> net/ipv6/ip6_input.c:152:21: warning: variable 'dropreason' set but not used [-Wunused-but-set-variable]
152 | const char *dropreason;
| ^~~~~~~~~~
net/ipv6/ip6_input.c: In function 'ip6_protocol_deliver_rcu':
net/ipv6/ip6_input.c:389:21: warning: variable 'dropreason' set but not used [-Wunused-but-set-variable]
389 | const char *dropreason;
| ^~~~~~~~~~
net/ipv6/ip6_input.c: In function 'ip6_input':
net/ipv6/ip6_input.c:526:25: warning: unused variable 'hdr' [-Wunused-variable]
526 | struct ipv6hdr *hdr = ipv6_hdr(skb);
| ^~~
--
net/ipv6/raw.c: In function 'rawv6_send_hdrinc':
>> net/ipv6/raw.c:631:21: warning: variable 'dropreason' set but not used [-Wunused-but-set-variable]
631 | const char *dropreason;
| ^~~~~~~~~~
--
net/ipv6/mcast.c: In function 'mld_sendpack':
>> net/ipv6/mcast.c:1796:21: warning: variable 'dropreason' set but not used [-Wunused-but-set-variable]
1796 | const char *dropreason;
| ^~~~~~~~~~
net/ipv6/mcast.c: In function 'igmp6_send':
net/ipv6/mcast.c:2167:21: warning: variable 'dropreason' set but not used [-Wunused-but-set-variable]
2167 | const char *dropreason;
| ^~~~~~~~~~
vim +/dropreason +69 net/ipv6/ip6_output.c
59
60 static int ip6_finish_output2(struct net *net, struct sock *sk, struct sk_buff *skb)
61 {
62 struct dst_entry *dst = skb_dst(skb);
63 struct net_device *dev = dst->dev;
64 struct inet6_dev *idev = ip6_dst_idev(dst);
65 unsigned int hh_len = LL_RESERVED_SPACE(dev);
66 const struct in6_addr *daddr, *nexthop;
67 struct ipv6hdr *hdr;
68 struct neighbour *neigh;
> 69 const char *dropreason;
70 int ret = 0;
71
72 /* Be paranoid, rather than too clever. */
73 if (unlikely(hh_len > skb_headroom(skb)) && dev->header_ops) {
74 skb = skb_expand_head(skb, hh_len);
75 if (!skb)
76 goto oom;
77 }
78
79 hdr = ipv6_hdr(skb);
80 daddr = &hdr->daddr;
81 if (ipv6_addr_is_multicast(daddr)) {
82 if (!(dev->flags & IFF_LOOPBACK) && sk_mc_loop(sk) &&
83 ((mroute6_is_socket(net, skb) &&
84 !(IP6CB(skb)->flags & IP6SKB_FORWARDED)) ||
85 ipv6_chk_mcast_addr(dev, daddr, &hdr->saddr))) {
86 struct sk_buff *newskb = skb_clone(skb, GFP_ATOMIC);
87
88 /* Do not check for IFF_ALLMULTI; multicast routing
89 is not supported in any case.
90 */
91 if (newskb)
92 NF_HOOK(NFPROTO_IPV6, NF_INET_POST_ROUTING,
93 net, sk, newskb, NULL, newskb->dev,
94 dev_loopback_xmit);
95
96 if (hdr->hop_limit == 0) {
97 dropreason = "hoplimit exceeded";
98
99 IP6_INC_STATS(net, idev,
100 IPSTATS_MIB_OUTDISCARDS);
101 goto drop;
102 }
103 }
104
105 IP6_UPD_PO_STATS(net, idev, IPSTATS_MIB_OUTMCAST, skb->len);
106 if (IPV6_ADDR_MC_SCOPE(daddr) <= IPV6_ADDR_SCOPE_NODELOCAL &&
107 !(dev->flags & IFF_LOOPBACK)) {
108 dropreason = "invalid scope";
109 goto drop;
110 }
111 }
112
113 if (lwtunnel_xmit_redirect(dst->lwtstate)) {
114 int res = lwtunnel_xmit(skb);
115
116 if (res < 0 || res == LWTUNNEL_XMIT_DONE)
117 return res;
118 }
119
120 rcu_read_lock_bh();
121 nexthop = rt6_nexthop((struct rt6_info *)dst, daddr);
122 neigh = __ipv6_neigh_lookup_noref(dev, nexthop);
123 if (unlikely(!neigh))
124 neigh = __neigh_create(&nd_tbl, nexthop, dev, false);
125 if (!IS_ERR(neigh)) {
126 sock_confirm_neigh(skb, neigh);
127 ret = neigh_output(neigh, skb, false);
128 rcu_read_unlock_bh();
129 return ret;
130 }
131 rcu_read_unlock_bh();
132
133 dropreason = "no route to host";
134 IP6_INC_STATS(net, idev, IPSTATS_MIB_OUTNOROUTES);
135 ret = -EINVAL;
136 drop:
137 DTRACE_IP(drop__out,
138 struct sk_buff * : pktinfo_t *, skb,
139 struct sock * : csinfo_t *, skb->sk,
140 void_ip_t * : ipinfo_t *, ipv6_hdr(skb),
141 struct net_device * : ifinfo_t *, skb->dev,
142 struct iphdr * : ipv4info_t *, NULL,
143 struct ipv6hdr * : ipv6info_t *, ipv6_hdr(skb),
144 const char * : string, dropreason);
145 kfree_skb(skb);
146 return ret;
147 oom:
148 DTRACE_IP(drop__out,
149 struct sk_buff * : pktinfo_t *, NULL,
150 struct sock * : csinfo_t *, NULL,
151 void_ip_t * : ipinfo_t *, NULL,
152 struct net_device * : ifinfo_t *, NULL,
153 struct iphdr * : ipv4info_t *, NULL,
154 struct ipv6hdr * : ipv6info_t *, NULL,
155 const char * : string, "out of memory");
156 IP6_INC_STATS(net, idev, IPSTATS_MIB_OUTDISCARDS);
157 return -ENOMEM;
158
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 2 weeks
[intel-lts:4.19/android 16527/22391] drivers/cpufreq/cpufreq_times.c:354:5: warning: no previous prototype for 'cpufreq_table_get_closed_index'
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 4.19/android
head: c911c00ec441e3b2661d07994890006fae429832
commit: 045c4cc9854e44be23f27501c397c8d1783a0708 [16527/22391] cpufreq statistics: support cpufreq driver without freq table
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc-linux-gcc (GCC) 11.2.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/intel/linux-intel-lts/commit/045c4cc9854e44be23f27501c...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 4.19/android
git checkout 045c4cc9854e44be23f27501c397c8d1783a0708
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=powerpc
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/cpufreq/cpufreq_times.c:354:5: warning: no previous prototype for 'cpufreq_table_get_closed_index' [-Wmissing-prototypes]
354 | int cpufreq_table_get_closed_index(int cpu, unsigned int freq)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/cpufreq/cpufreq_times.c:367:6: warning: no previous prototype for 'cpufreq_times_create_policy_no_freq_table' [-Wmissing-prototypes]
367 | void cpufreq_times_create_policy_no_freq_table(struct cpufreq_policy *policy)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/cpufreq_table_get_closed_index +354 drivers/cpufreq/cpufreq_times.c
350
351 #define CPU_FREQ_STEPS 100000
352 // Suppose all cores have same freq count
353 static int all_freq_count;
> 354 int cpufreq_table_get_closed_index(int cpu, unsigned int freq)
355 {
356 int i;
357 unsigned int rounded_freq;
358
359 rounded_freq = freq + CPU_FREQ_STEPS / 2;
360 for (i = 0; i < all_freq_count; i++) {
361 if ((rounded_freq - all_freqs[cpu]->freq_table[i]) / CPU_FREQ_STEPS == 0)
362 return i;
363 }
364 return -1;
365 }
366
> 367 void cpufreq_times_create_policy_no_freq_table(struct cpufreq_policy *policy)
368 {
369 int cpu, index, i;
370 unsigned int count = 0;
371 struct cpu_freqs *freqs;
372 void *tmp;
373
374 if (all_freqs[policy->cpu])
375 return;
376
377 count = (policy->max - policy->min) / CPU_FREQ_STEPS + 1;
378 if ((policy->max - policy->min) % CPU_FREQ_STEPS)
379 count++;
380
381 if (count > 100)
382 return;
383
384 tmp = kzalloc(sizeof(*freqs) + sizeof(freqs->freq_table[0]) * count,
385 GFP_KERNEL);
386 if (!tmp)
387 return;
388
389 freqs = tmp;
390 freqs->max_state = count;
391 all_freq_count = count;
392
393 freqs->freq_table[0] = policy->min;
394 freqs->freq_table[count - 1] = policy->max;
395 for (i = 1; i < count - 1; i++)
396 freqs->freq_table[i] = policy->min + i * CPU_FREQ_STEPS;
397 freqs->offset = next_offset;
398 WRITE_ONCE(next_offset, freqs->offset + count);
399 for_each_cpu(cpu, policy->related_cpus)
400 all_freqs[cpu] = freqs;
401
402 index = cpufreq_table_get_closed_index(policy->cpu, policy->cur);
403 if (index >= 0)
404 WRITE_ONCE(freqs->last_index, index);
405 }
406
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 2 weeks
[andersson:wip/c630-next-20210923 2460/3825] clk-imx8ulp.c:undefined reference to `imx8ulp_clk_hw_composite'
by kernel test robot
tree: https://github.com/andersson/kernel wip/c630-next-20210923
head: 3d3d4e4577d56b0978925c2ba7555a4a5aac49ef
commit: 871225d4bf185998d4918bec7987ed537fcbe76b [2460/3825] clk: imx: Add clock driver for imx8ulp
config: nios2-randconfig-r036-20210929 (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.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/andersson/kernel/commit/871225d4bf185998d4918bec7987ed...
git remote add andersson https://github.com/andersson/kernel
git fetch --no-tags andersson wip/c630-next-20210923
git checkout 871225d4bf185998d4918bec7987ed537fcbe76b
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
nios2-linux-ld: drivers/clk/imx/clk-imx8ulp.o: in function `imx8ulp_clk_pcc4_init':
>> clk-imx8ulp.c:(.text+0xe4): undefined reference to `imx8ulp_clk_hw_composite'
clk-imx8ulp.c:(.text+0xe4): relocation truncated to fit: R_NIOS2_CALL26 against `imx8ulp_clk_hw_composite'
>> nios2-linux-ld: clk-imx8ulp.c:(.text+0x118): undefined reference to `imx8ulp_clk_hw_composite'
clk-imx8ulp.c:(.text+0x118): relocation truncated to fit: R_NIOS2_CALL26 against `imx8ulp_clk_hw_composite'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x14c): undefined reference to `imx8ulp_clk_hw_composite'
clk-imx8ulp.c:(.text+0x14c): relocation truncated to fit: R_NIOS2_CALL26 against `imx8ulp_clk_hw_composite'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x180): undefined reference to `imx8ulp_clk_hw_composite'
clk-imx8ulp.c:(.text+0x180): relocation truncated to fit: R_NIOS2_CALL26 against `imx8ulp_clk_hw_composite'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x1b4): undefined reference to `imx8ulp_clk_hw_composite'
clk-imx8ulp.c:(.text+0x1b4): relocation truncated to fit: R_NIOS2_CALL26 against `imx8ulp_clk_hw_composite'
nios2-linux-ld: drivers/clk/imx/clk-imx8ulp.o:clk-imx8ulp.c:(.text+0x1e8): more undefined references to `imx8ulp_clk_hw_composite' follow
drivers/clk/imx/clk-imx8ulp.o: in function `imx8ulp_clk_pcc4_init':
clk-imx8ulp.c:(.text+0x1e8): relocation truncated to fit: R_NIOS2_CALL26 against `imx8ulp_clk_hw_composite'
clk-imx8ulp.c:(.text+0x21c): relocation truncated to fit: R_NIOS2_CALL26 against `imx8ulp_clk_hw_composite'
clk-imx8ulp.c:(.text+0x250): relocation truncated to fit: R_NIOS2_CALL26 against `imx8ulp_clk_hw_composite'
clk-imx8ulp.c:(.text+0x284): relocation truncated to fit: R_NIOS2_CALL26 against `imx8ulp_clk_hw_composite'
>> nios2-linux-ld: clk-imx8ulp.c:(.text+0x288): undefined reference to `imx_ccm_lock'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x28c): undefined reference to `imx_ccm_lock'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x348): undefined reference to `imx8ulp_clk_hw_composite'
clk-imx8ulp.c:(.text+0x348): relocation truncated to fit: R_NIOS2_CALL26 against `imx8ulp_clk_hw_composite'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x37c): undefined reference to `imx8ulp_clk_hw_composite'
clk-imx8ulp.c:(.text+0x37c): additional relocation overflows omitted from the output
nios2-linux-ld: clk-imx8ulp.c:(.text+0x3b0): undefined reference to `imx8ulp_clk_hw_composite'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x3e4): undefined reference to `imx8ulp_clk_hw_composite'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x418): undefined reference to `imx8ulp_clk_hw_composite'
nios2-linux-ld: drivers/clk/imx/clk-imx8ulp.o:clk-imx8ulp.c:(.text+0x44c): more undefined references to `imx8ulp_clk_hw_composite' follow
nios2-linux-ld: drivers/clk/imx/clk-imx8ulp.o: in function `imx8ulp_clk_pcc4_init':
>> clk-imx8ulp.c:(.text+0x588): undefined reference to `imx_check_clk_hws'
nios2-linux-ld: drivers/clk/imx/clk-imx8ulp.o: in function `imx8ulp_clk_pcc3_init':
clk-imx8ulp.c:(.text+0x688): undefined reference to `imx8ulp_clk_hw_composite'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x6bc): undefined reference to `imx8ulp_clk_hw_composite'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x6f0): undefined reference to `imx8ulp_clk_hw_composite'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x724): undefined reference to `imx8ulp_clk_hw_composite'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x758): undefined reference to `imx8ulp_clk_hw_composite'
nios2-linux-ld: drivers/clk/imx/clk-imx8ulp.o:clk-imx8ulp.c:(.text+0x78c): more undefined references to `imx8ulp_clk_hw_composite' follow
nios2-linux-ld: drivers/clk/imx/clk-imx8ulp.o: in function `imx8ulp_clk_pcc3_init':
>> clk-imx8ulp.c:(.text+0x8fc): undefined reference to `imx_ccm_lock'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x900): undefined reference to `imx_ccm_lock'
>> nios2-linux-ld: clk-imx8ulp.c:(.text+0x11d8): undefined reference to `imx_check_clk_hws'
>> nios2-linux-ld: clk-imx8ulp.c:(.text+0x11f8): undefined reference to `imx_register_uart_clocks'
nios2-linux-ld: drivers/clk/imx/clk-imx8ulp.o: in function `imx8ulp_clk_pcc5_init':
clk-imx8ulp.c:(.text+0x12b4): undefined reference to `imx_ccm_lock'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x12bc): undefined reference to `imx_ccm_lock'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x1b74): undefined reference to `imx8ulp_clk_hw_composite'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x1c28): undefined reference to `imx8ulp_clk_hw_composite'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x1c5c): undefined reference to `imx8ulp_clk_hw_composite'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x1c90): undefined reference to `imx8ulp_clk_hw_composite'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x1cc4): undefined reference to `imx8ulp_clk_hw_composite'
nios2-linux-ld: drivers/clk/imx/clk-imx8ulp.o:clk-imx8ulp.c:(.text+0x1cf8): more undefined references to `imx8ulp_clk_hw_composite' follow
nios2-linux-ld: drivers/clk/imx/clk-imx8ulp.o: in function `imx8ulp_clk_pcc5_init':
clk-imx8ulp.c:(.text+0x1f7c): undefined reference to `imx_check_clk_hws'
nios2-linux-ld: drivers/clk/imx/clk-imx8ulp.o: in function `imx8ulp_clk_cgc2_init':
clk-imx8ulp.c:(.text+0x2054): undefined reference to `imx_ccm_lock'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x205c): undefined reference to `imx_ccm_lock'
>> nios2-linux-ld: clk-imx8ulp.c:(.text+0x20cc): undefined reference to `imx_clk_hw_pllv4'
>> nios2-linux-ld: clk-imx8ulp.c:(.text+0x2434): undefined reference to `imx_clk_hw_pfdv2'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x2458): undefined reference to `imx_clk_hw_pfdv2'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x2480): undefined reference to `imx_clk_hw_pfdv2'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x24a8): undefined reference to `imx_clk_hw_pfdv2'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x2e00): undefined reference to `imx_check_clk_hws'
nios2-linux-ld: drivers/clk/imx/clk-imx8ulp.o: in function `imx8ulp_clk_cgc1_init':
clk-imx8ulp.c:(.text+0x2f08): undefined reference to `imx_ccm_lock'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x2f10): undefined reference to `imx_ccm_lock'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x2fcc): undefined reference to `imx_clk_hw_pllv4'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x2fec): undefined reference to `imx_clk_hw_pllv4'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x3064): undefined reference to `imx_clk_hw_pfdv2'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x3088): undefined reference to `imx_clk_hw_pfdv2'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x30b0): undefined reference to `imx_clk_hw_pfdv2'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x30d8): undefined reference to `imx_clk_hw_pfdv2'
nios2-linux-ld: clk-imx8ulp.c:(.text+0x3c2c): undefined reference to `imx_check_clk_hws'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 2 weeks
[intel-lts:5.4/preempt-rt 9824/19040] vpusmm_driver.c:undefined reference to `dma_buf_unmap_attachment'
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/preempt-rt
head: 36a2ba81b7c7178b0612363a1af6f22887905cc6
commit: 2c4a98833ded50c324a6c5e7c949f93cca137acf [9824/19040] misc: vpusmm: add alloc/import DMABuf for VPU
config: s390-randconfig-r033-20211028 (attached as .config)
compiler: s390-linux-gcc (GCC) 11.2.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/intel/linux-intel-lts/commit/2c4a98833ded50c324a6c5e7c...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.4/preempt-rt
git checkout 2c4a98833ded50c324a6c5e7c949f93cca137acf
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=s390 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
s390-linux-ld: drivers/irqchip/irq-al-fic.o: in function `al_fic_init_dt':
irq-al-fic.c:(.init.text+0x2e): undefined reference to `of_iomap'
s390-linux-ld: irq-al-fic.c:(.init.text+0x1e2): undefined reference to `iounmap'
s390-linux-ld: drivers/phy/marvell/phy-mvebu-a3700-utmi.o: in function `mvebu_a3700_utmi_phy_probe':
phy-mvebu-a3700-utmi.c:(.text+0x3d0): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/soc/fsl/dpaa2-console.o: in function `dpaa2_console_close':
dpaa2-console.c:(.text+0x7c): undefined reference to `iounmap'
s390-linux-ld: drivers/soc/fsl/dpaa2-console.o: in function `dpaa2_console_probe':
dpaa2-console.c:(.text+0xd0): undefined reference to `of_address_to_resource'
s390-linux-ld: drivers/soc/fsl/dpaa2-console.o: in function `dpaa2_generic_console_open.constprop.0':
dpaa2-console.c:(.text+0x17e): undefined reference to `ioremap'
s390-linux-ld: dpaa2-console.c:(.text+0x1a6): undefined reference to `iounmap'
s390-linux-ld: dpaa2-console.c:(.text+0x1ba): undefined reference to `ioremap'
s390-linux-ld: dpaa2-console.c:(.text+0x210): undefined reference to `iounmap'
s390-linux-ld: drivers/char/hw_random/exynos-trng.o: in function `exynos_trng_probe':
exynos-trng.c:(.text+0x21a): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/char/hw_random/meson-rng.o: in function `meson_rng_probe':
meson-rng.c:(.text+0x84): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/char/hw_random/mtk-rng.o: in function `mtk_rng_probe':
mtk-rng.c:(.text+0x246): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/char/xillybus/xillybus_of.o: in function `xilly_drv_probe':
xillybus_of.c:(.text+0x1fa): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/misc/vpusmm/vpusmm_driver.o: in function `vpusmm_release':
>> vpusmm_driver.c:(.text+0x1c8): undefined reference to `dma_buf_unmap_attachment'
>> s390-linux-ld: vpusmm_driver.c:(.text+0x1da): undefined reference to `dma_buf_detach'
>> s390-linux-ld: vpusmm_driver.c:(.text+0x1f0): undefined reference to `dma_buf_put'
s390-linux-ld: drivers/misc/vpusmm/vpusmm_driver.o: in function `vpusmm_session_import_dmabuf.constprop.0':
vpusmm_driver.c:(.text+0xa38): undefined reference to `dma_buf_map_attachment'
s390-linux-ld: vpusmm_driver.c:(.text+0xa5c): undefined reference to `dma_buf_detach'
>> s390-linux-ld: vpusmm_driver.c:(.text+0xa82): undefined reference to `dma_buf_unmap_attachment'
s390-linux-ld: vpusmm_driver.c:(.text+0xa96): undefined reference to `dma_buf_detach'
s390-linux-ld: vpusmm_driver.c:(.text+0xb3c): undefined reference to `dma_buf_unmap_attachment'
s390-linux-ld: vpusmm_driver.c:(.text+0xb50): undefined reference to `dma_buf_detach'
>> s390-linux-ld: vpusmm_driver.c:(.text+0xc1a): undefined reference to `dma_buf_attach'
s390-linux-ld: drivers/misc/vpusmm/vpusmm_driver.o: in function `vpusmm_session_alloc.isra.0':
>> vpusmm_driver.c:(.text+0xf88): undefined reference to `dma_buf_export'
>> s390-linux-ld: vpusmm_driver.c:(.text+0xfa4): undefined reference to `dma_buf_fd'
s390-linux-ld: vpusmm_driver.c:(.text+0xfc8): undefined reference to `dma_buf_put'
s390-linux-ld: drivers/misc/vpusmm/vpusmm_driver.o: in function `vpusmm_ioctl':
>> vpusmm_driver.c:(.text+0x1148): undefined reference to `dma_buf_get'
s390-linux-ld: vpusmm_driver.c:(.text+0x1184): undefined reference to `dma_buf_put'
s390-linux-ld: vpusmm_driver.c:(.text+0x11b4): undefined reference to `dma_buf_get'
s390-linux-ld: vpusmm_driver.c:(.text+0x1234): undefined reference to `dma_buf_unmap_attachment'
s390-linux-ld: vpusmm_driver.c:(.text+0x1246): undefined reference to `dma_buf_detach'
s390-linux-ld: vpusmm_driver.c:(.text+0x1252): undefined reference to `dma_buf_put'
s390-linux-ld: vpusmm_driver.c:(.text+0x1270): undefined reference to `dma_buf_put'
s390-linux-ld: drivers/scsi/ufs/ufshcd-pltfrm.o: in function `ufshcd_pltfrm_init':
ufshcd-pltfrm.c:(.text+0x530): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/net/can/grcan.o: in function `grcan_probe':
grcan.c:(.text+0x1252): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/pcmcia/cistpl.o: in function `set_cis_map':
cistpl.c:(.text+0x250): undefined reference to `ioremap'
s390-linux-ld: cistpl.c:(.text+0x286): undefined reference to `iounmap'
s390-linux-ld: cistpl.c:(.text+0x2ae): undefined reference to `iounmap'
s390-linux-ld: cistpl.c:(.text+0x2c0): undefined reference to `ioremap'
s390-linux-ld: drivers/pcmcia/cistpl.o: in function `release_cis_mem':
cistpl.c:(.text+0xd98): undefined reference to `iounmap'
s390-linux-ld: drivers/input/serio/apbps2.o: in function `apbps2_of_probe':
apbps2.c:(.text+0x256): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/input/keyboard/omap4-keypad.o: in function `omap4_keypad_remove':
omap4-keypad.c:(.text+0x4c): undefined reference to `iounmap'
s390-linux-ld: drivers/input/keyboard/omap4-keypad.o: in function `omap4_keypad_probe':
omap4-keypad.c:(.text+0x1b6): undefined reference to `ioremap'
s390-linux-ld: omap4-keypad.c:(.text+0x1c8): undefined reference to `iounmap'
s390-linux-ld: drivers/ptp/ptp_qoriq.o: in function `ptp_qoriq_probe':
ptp_qoriq.c:(.text+0xc68): undefined reference to `ioremap'
s390-linux-ld: ptp_qoriq.c:(.text+0xc96): undefined reference to `iounmap'
s390-linux-ld: drivers/ptp/ptp_qoriq.o: in function `ptp_qoriq_free':
ptp_qoriq.c:(.text+0xd58): undefined reference to `iounmap'
s390-linux-ld: drivers/crypto/ccree/cc_driver.o: in function `init_cc_resources':
cc_driver.c:(.text+0x3b0): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/crypto/ccree/cc_debugfs.o: in function `cc_debugfs_init':
cc_debugfs.c:(.text+0xbe): undefined reference to `debugfs_create_regset32'
s390-linux-ld: cc_debugfs.c:(.text+0x15a): undefined reference to `debugfs_create_regset32'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 2 weeks
Re: [PATCH] ACPI: OSL: Handle the return value of acpi_os_map_generic_address() for a non-register GAS
by Dan Carpenter
Hi,
url: https://github.com/0day-ci/linux/commits/james-liu-hpe-com/ACPI-OSL-Handl...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: i386-randconfig-m021-20211025 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/acpi/osl.c:467 acpi_os_map_generic_address() error: uninitialized symbol 'addr'.
vim +/addr +467 drivers/acpi/osl.c
6915564dc5a8ab Rafael J. Wysocki 2020-09-11 453 void __iomem *acpi_os_map_generic_address(struct acpi_generic_address *gas)
29718521237a1b Myron Stowe 2010-10-21 454 {
bc9ffce27962c0 Myron Stowe 2011-11-07 455 u64 addr;
29718521237a1b Myron Stowe 2010-10-21 456
bc9ffce27962c0 Myron Stowe 2011-11-07 457 if (gas->space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY)
6915564dc5a8ab Rafael J. Wysocki 2020-09-11 458 return NULL;
f0340367a7885a James Liu 2021-10-22 459 /* Handle a non-register GAS (i.e., a pointer to a data structure),
f0340367a7885a James Liu 2021-10-22 460 * whose bit width is expected to be 0 according to ACPI spec. 6.4.
f0340367a7885a James Liu 2021-10-22 461 * For example, The RegisterRegion field in SET_ERROR_TYPE_WITH_ADDRESS
f0340367a7885a James Liu 2021-10-22 462 * points to a data structure whose format is defined in Table 18.30 in
f0340367a7885a James Liu 2021-10-22 463 * ACPI Spec. 6.4
f0340367a7885a James Liu 2021-10-22 464 */
f0340367a7885a James Liu 2021-10-22 465 if (!gas->bit_width) {
f0340367a7885a James Liu 2021-10-22 466 pr_info("Mapping IOMEM for a non-register GAS.\n");
f0340367a7885a James Liu 2021-10-22 @467 return acpi_os_map_iomem(addr, sizeof(unsigned long long));
^ ^^^^
Uninitialized.
f0340367a7885a James Liu 2021-10-22 468 }
29718521237a1b Myron Stowe 2010-10-21 469
bc9ffce27962c0 Myron Stowe 2011-11-07 470 /* Handle possible alignment issues */
bc9ffce27962c0 Myron Stowe 2011-11-07 471 memcpy(&addr, &gas->address, sizeof(addr));
f0340367a7885a James Liu 2021-10-22 472 if (!addr)
6915564dc5a8ab Rafael J. Wysocki 2020-09-11 473 return NULL;
f0340367a7885a James Liu 2021-10-22 474 else
6915564dc5a8ab Rafael J. Wysocki 2020-09-11 475 return acpi_os_map_iomem(addr, gas->bit_width / 8);
29718521237a1b Myron Stowe 2010-10-21 476 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 2 weeks
[linux-next:master 13255/13500] fs/udf/dir.c:78:25: error: cast from pointer to integer of different size
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: c8109c2ba35e9bfd8a55087ffb1f42cc0dcf71e6
commit: 39a464de961f256197934d36aa5dda546cba8ed0 [13255/13500] udf: Fix crash after seekdir
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 39a464de961f256197934d36aa5dda546cba8ed0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.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 errors (new ones prefixed by >>):
fs/udf/dir.c: In function 'udf_readdir':
>> fs/udf/dir.c:78:25: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
78 | if (ctx->pos != (loff_t)file->private_data) {
| ^
>> fs/udf/dir.c:211:30: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
211 | file->private_data = (void *)ctx->pos;
| ^
cc1: all warnings being treated as errors
vim +78 fs/udf/dir.c
37
38 static int udf_readdir(struct file *file, struct dir_context *ctx)
39 {
40 struct inode *dir = file_inode(file);
41 struct udf_inode_info *iinfo = UDF_I(dir);
42 struct udf_fileident_bh fibh = { .sbh = NULL, .ebh = NULL};
43 struct fileIdentDesc *fi = NULL;
44 struct fileIdentDesc cfi;
45 udf_pblk_t block, iblock;
46 loff_t nf_pos, emit_pos;
47 int flen;
48 unsigned char *fname = NULL, *copy_name = NULL;
49 unsigned char *nameptr;
50 uint16_t liu;
51 uint8_t lfi;
52 loff_t size = udf_ext0_offset(dir) + dir->i_size;
53 struct buffer_head *tmp, *bha[16];
54 struct kernel_lb_addr eloc;
55 uint32_t elen;
56 sector_t offset;
57 int i, num, ret = 0;
58 struct extent_position epos = { NULL, 0, {0, 0} };
59 struct super_block *sb = dir->i_sb;
60
61 if (ctx->pos == 0) {
62 if (!dir_emit_dot(file, ctx))
63 return 0;
64 ctx->pos = 1;
65 }
66 nf_pos = (ctx->pos - 1) << 2;
67 if (nf_pos >= size)
68 goto out;
69
70 /*
71 * Did our position change since last readdir (likely lseek was
72 * called)? We need to verify the position correctly points at the
73 * beginning of some dir entry so that the directory parsing code does
74 * not get confused. Since UDF does not have any reliable way of
75 * identifying beginning of dir entry (names are under user control),
76 * we need to scan the directory from the beginning.
77 */
> 78 if (ctx->pos != (loff_t)file->private_data) {
79 emit_pos = nf_pos;
80 nf_pos = 0;
81 }
82
83 fname = kmalloc(UDF_NAME_LEN, GFP_NOFS);
84 if (!fname) {
85 ret = -ENOMEM;
86 goto out;
87 }
88
89 if (nf_pos == 0)
90 nf_pos = udf_ext0_offset(dir);
91
92 fibh.soffset = fibh.eoffset = nf_pos & (sb->s_blocksize - 1);
93 if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB) {
94 if (inode_bmap(dir, nf_pos >> sb->s_blocksize_bits,
95 &epos, &eloc, &elen, &offset)
96 != (EXT_RECORDED_ALLOCATED >> 30)) {
97 ret = -ENOENT;
98 goto out;
99 }
100 block = udf_get_lb_pblock(sb, &eloc, offset);
101 if ((++offset << sb->s_blocksize_bits) < elen) {
102 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT)
103 epos.offset -= sizeof(struct short_ad);
104 else if (iinfo->i_alloc_type ==
105 ICBTAG_FLAG_AD_LONG)
106 epos.offset -= sizeof(struct long_ad);
107 } else {
108 offset = 0;
109 }
110
111 if (!(fibh.sbh = fibh.ebh = udf_tread(sb, block))) {
112 ret = -EIO;
113 goto out;
114 }
115
116 if (!(offset & ((16 >> (sb->s_blocksize_bits - 9)) - 1))) {
117 i = 16 >> (sb->s_blocksize_bits - 9);
118 if (i + offset > (elen >> sb->s_blocksize_bits))
119 i = (elen >> sb->s_blocksize_bits) - offset;
120 for (num = 0; i > 0; i--) {
121 block = udf_get_lb_pblock(sb, &eloc, offset + i);
122 tmp = udf_tgetblk(sb, block);
123 if (tmp && !buffer_uptodate(tmp) && !buffer_locked(tmp))
124 bha[num++] = tmp;
125 else
126 brelse(tmp);
127 }
128 if (num) {
129 ll_rw_block(REQ_OP_READ, REQ_RAHEAD, num, bha);
130 for (i = 0; i < num; i++)
131 brelse(bha[i]);
132 }
133 }
134 }
135
136 while (nf_pos < size) {
137 struct kernel_lb_addr tloc;
138 loff_t cur_pos = nf_pos;
139
140 /* Update file position only if we got past the current one */
141 if (nf_pos >= emit_pos)
142 ctx->pos = (nf_pos >> 2) + 1;
143
144 fi = udf_fileident_read(dir, &nf_pos, &fibh, &cfi, &epos, &eloc,
145 &elen, &offset);
146 if (!fi)
147 goto out;
148 /* Still not at offset where user asked us to read from? */
149 if (cur_pos < emit_pos)
150 continue;
151
152 liu = le16_to_cpu(cfi.lengthOfImpUse);
153 lfi = cfi.lengthFileIdent;
154
155 if (fibh.sbh == fibh.ebh) {
156 nameptr = udf_get_fi_ident(fi);
157 } else {
158 int poffset; /* Unpaded ending offset */
159
160 poffset = fibh.soffset + sizeof(struct fileIdentDesc) + liu + lfi;
161
162 if (poffset >= lfi) {
163 nameptr = (char *)(fibh.ebh->b_data + poffset - lfi);
164 } else {
165 if (!copy_name) {
166 copy_name = kmalloc(UDF_NAME_LEN,
167 GFP_NOFS);
168 if (!copy_name) {
169 ret = -ENOMEM;
170 goto out;
171 }
172 }
173 nameptr = copy_name;
174 memcpy(nameptr, udf_get_fi_ident(fi),
175 lfi - poffset);
176 memcpy(nameptr + lfi - poffset,
177 fibh.ebh->b_data, poffset);
178 }
179 }
180
181 if ((cfi.fileCharacteristics & FID_FILE_CHAR_DELETED) != 0) {
182 if (!UDF_QUERY_FLAG(sb, UDF_FLAG_UNDELETE))
183 continue;
184 }
185
186 if ((cfi.fileCharacteristics & FID_FILE_CHAR_HIDDEN) != 0) {
187 if (!UDF_QUERY_FLAG(sb, UDF_FLAG_UNHIDE))
188 continue;
189 }
190
191 if (cfi.fileCharacteristics & FID_FILE_CHAR_PARENT) {
192 if (!dir_emit_dotdot(file, ctx))
193 goto out;
194 continue;
195 }
196
197 flen = udf_get_filename(sb, nameptr, lfi, fname, UDF_NAME_LEN);
198 if (flen < 0)
199 continue;
200
201 tloc = lelb_to_cpu(cfi.icb.extLocation);
202 iblock = udf_get_lb_pblock(sb, &tloc, 0);
203 if (!dir_emit(ctx, fname, flen, iblock, DT_UNKNOWN))
204 goto out;
205 } /* end while */
206
207 ctx->pos = (nf_pos >> 2) + 1;
208
209 out:
210 /* Store position where we've ended */
> 211 file->private_data = (void *)ctx->pos;
212 if (fibh.sbh != fibh.ebh)
213 brelse(fibh.ebh);
214 brelse(fibh.sbh);
215 brelse(epos.bh);
216 kfree(fname);
217 kfree(copy_name);
218
219 return ret;
220 }
221
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 2 weeks
[intel-lts:5.10/preempt-rt 17465/17939] drivers/net/ethernet/intel/igc/igc_main.c:2709:17: warning: variable 'timestamp' set but not used
by kernel test robot
Hi Muhammad,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 5.10/preempt-rt
head: 87730b5bba3003ee22dcfa6d5d7b118d3d433611
commit: 765ce62a0644876bc2eb57fe84ab526f74129d6a [17465/17939] igc: Enable HW TX Timestamp for AF_XDP ZC
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 11.2.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/intel/linux-intel-lts/commit/765ce62a0644876bc2eb57fe8...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/preempt-rt
git checkout 765ce62a0644876bc2eb57fe84ab526f74129d6a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=ia64
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/net/ethernet/intel/igc/igc_main.c: In function 'igc_clean_tx_irq':
>> drivers/net/ethernet/intel/igc/igc_main.c:2709:17: warning: variable 'timestamp' set but not used [-Wunused-but-set-variable]
2709 | ktime_t timestamp = 0;
| ^~~~~~~~~
vim +/timestamp +2709 drivers/net/ethernet/intel/igc/igc_main.c
2692
2693 /**
2694 * igc_clean_tx_irq - Reclaim resources after transmit completes
2695 * @q_vector: pointer to q_vector containing needed info
2696 * @napi_budget: Used to determine if we are in netpoll
2697 *
2698 * returns true if ring is completely cleaned
2699 */
2700 static bool igc_clean_tx_irq(struct igc_q_vector *q_vector, int napi_budget)
2701 {
2702 struct igc_adapter *adapter = q_vector->adapter;
2703 unsigned int total_bytes = 0, total_packets = 0;
2704 unsigned int budget = q_vector->tx.work_limit;
2705 struct igc_ring *tx_ring = q_vector->tx.ring;
2706 unsigned int i = tx_ring->next_to_clean;
2707 struct igc_tx_buffer *tx_buffer;
2708 union igc_adv_tx_desc *tx_desc;
> 2709 ktime_t timestamp = 0;
2710 u32 xsk_frames = 0;
2711
2712 if (test_bit(__IGC_DOWN, &adapter->state))
2713 return true;
2714
2715 tx_buffer = &tx_ring->tx_buffer_info[i];
2716 tx_desc = IGC_TX_DESC(tx_ring, i);
2717 i -= tx_ring->count;
2718
2719 do {
2720 union igc_adv_tx_desc *eop_desc = tx_buffer->next_to_watch;
2721
2722 /* if next_to_watch is not set then there is no work pending */
2723 if (!eop_desc)
2724 break;
2725
2726 /* prevent any other reads prior to eop_desc */
2727 smp_rmb();
2728
2729 /* if DD is not set pending work has not been completed */
2730 if (!(eop_desc->wb.status & cpu_to_le32(IGC_TXD_STAT_DD)))
2731 break;
2732
2733 if (eop_desc->wb.status & cpu_to_le32(IGC_TXD_STAT_TS_STAT) &&
2734 tx_buffer->tx_flags & IGC_TX_FLAGS_DMA_TSTAMP) {
2735 u64 tstamp = le64_to_cpu(eop_desc->wb.dma_tstamp);
2736
2737 if (tx_ring->xsk_pool && adapter->tstamp_config.tx_type == HWTSTAMP_TX_ON)
2738 timestamp = igc_tx_dma_hw_tstamp(adapter, tstamp);
2739 else
2740 igc_ptp_tx_dma_tstamp(adapter, tx_buffer->skb, tstamp);
2741 }
2742
2743 /* clear next_to_watch to prevent false hangs */
2744 tx_buffer->next_to_watch = NULL;
2745
2746 /* update the statistics for this packet */
2747 total_bytes += tx_buffer->bytecount;
2748 total_packets += tx_buffer->gso_segs;
2749
2750 switch (tx_buffer->type) {
2751 case IGC_TX_BUFFER_TYPE_XSK:
2752 xsk_frames++;
2753 break;
2754 case IGC_TX_BUFFER_TYPE_XDP:
2755 xdp_return_frame(tx_buffer->xdpf);
2756 igc_unmap_tx_buffer(tx_ring->dev, tx_buffer);
2757 break;
2758 case IGC_TX_BUFFER_TYPE_SKB:
2759 napi_consume_skb(tx_buffer->skb, napi_budget);
2760 igc_unmap_tx_buffer(tx_ring->dev, tx_buffer);
2761 break;
2762 default:
2763 netdev_warn_once(tx_ring->netdev,
2764 "Unknown tx buffer type\n");
2765 break;
2766 }
2767
2768 /* clear last DMA location and unmap remaining buffers */
2769 while (tx_desc != eop_desc) {
2770 tx_buffer++;
2771 tx_desc++;
2772 i++;
2773 if (unlikely(!i)) {
2774 i -= tx_ring->count;
2775 tx_buffer = tx_ring->tx_buffer_info;
2776 tx_desc = IGC_TX_DESC(tx_ring, 0);
2777 }
2778
2779 /* unmap any remaining paged data */
2780 if (dma_unmap_len(tx_buffer, len))
2781 igc_unmap_tx_buffer(tx_ring->dev, tx_buffer);
2782 }
2783
2784 /* move us one more past the eop_desc for start of next pkt */
2785 tx_buffer++;
2786 tx_desc++;
2787 i++;
2788 if (unlikely(!i)) {
2789 i -= tx_ring->count;
2790 tx_buffer = tx_ring->tx_buffer_info;
2791 tx_desc = IGC_TX_DESC(tx_ring, 0);
2792 }
2793
2794 /* issue prefetch for next Tx descriptor */
2795 prefetch(tx_desc);
2796
2797 /* update budget accounting */
2798 budget--;
2799 } while (likely(budget));
2800
2801 netdev_tx_completed_queue(txring_txq(tx_ring),
2802 total_packets, total_bytes);
2803
2804 i += tx_ring->count;
2805 tx_ring->next_to_clean = i;
2806
2807 igc_update_tx_stats(q_vector, total_packets, total_bytes);
2808
2809 if (tx_ring->xsk_pool) {
2810 if (xsk_frames)
2811 xsk_tx_completed(tx_ring->xsk_pool, xsk_frames);
2812 if (xsk_uses_need_wakeup(tx_ring->xsk_pool))
2813 xsk_set_tx_need_wakeup(tx_ring->xsk_pool);
2814 igc_xdp_xmit_zc(tx_ring);
2815 }
2816
2817 if (test_bit(IGC_RING_FLAG_TX_DETECT_HANG, &tx_ring->flags)) {
2818 struct igc_hw *hw = &adapter->hw;
2819
2820 /* Detect a transmit hang in hardware, this serializes the
2821 * check with the clearing of time_stamp and movement of i
2822 */
2823 clear_bit(IGC_RING_FLAG_TX_DETECT_HANG, &tx_ring->flags);
2824 if (tx_buffer->next_to_watch &&
2825 time_after(jiffies, tx_buffer->time_stamp +
2826 (adapter->tx_timeout_factor * HZ)) &&
2827 !(rd32(IGC_STATUS) & IGC_STATUS_TXOFF)) {
2828 /* detected Tx unit hang */
2829 netdev_err(tx_ring->netdev,
2830 "Detected Tx Unit Hang\n"
2831 " Tx Queue <%d>\n"
2832 " TDH <%x>\n"
2833 " TDT <%x>\n"
2834 " next_to_use <%x>\n"
2835 " next_to_clean <%x>\n"
2836 "buffer_info[next_to_clean]\n"
2837 " time_stamp <%lx>\n"
2838 " next_to_watch <%p>\n"
2839 " jiffies <%lx>\n"
2840 " desc.status <%x>\n",
2841 tx_ring->queue_index,
2842 rd32(IGC_TDH(tx_ring->reg_idx)),
2843 readl(tx_ring->tail),
2844 tx_ring->next_to_use,
2845 tx_ring->next_to_clean,
2846 tx_buffer->time_stamp,
2847 tx_buffer->next_to_watch,
2848 jiffies,
2849 tx_buffer->next_to_watch->wb.status);
2850 netif_stop_subqueue(tx_ring->netdev,
2851 tx_ring->queue_index);
2852
2853 /* we are about to reset, no point in enabling stuff */
2854 return true;
2855 }
2856 }
2857
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 2 weeks