[kbuild] Re: [PATCH net-next v2 1/2] of: net: pass the dst buffer to of_get_mac_address()
Hi Michael, url: https://github.com/0day-ci/linux/commits/Michael-Walle/of-net-support-non-platform-devices-in-of_get_mac_address/20210406-234030 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git cc0626c2aaed8e475efdd85fa374b497a7192e35 config: x86_64-randconfig-m001-20210406 (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 Reported-by: Dan Carpenter smatch warnings: drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2069 axienet_probe() warn: passing a valid pointer to 'PTR_ERR' vim +/PTR_ERR +2069 drivers/net/ethernet/xilinx/xilinx_axienet_main.c 522856cefaf09d Robert Hancock 2019-06-06 2060 /* Check for Ethernet core IRQ (optional) */ 522856cefaf09d Robert Hancock 2019-06-06 2061 if (lp->eth_irq <= 0) 522856cefaf09d Robert Hancock 2019-06-06 2062 dev_info(&pdev->dev, "Ethernet core IRQ not defined\n"); 522856cefaf09d Robert Hancock 2019-06-06 2063 8a3b7a252dca9f Daniel Borkmann 2012-01-19 2064 /* Retrieve the MAC address */ 411b125c6ace1f Michael Walle 2021-04-06 2065 ret = of_get_mac_address(pdev->dev.of_node, mac_addr); 411b125c6ace1f Michael Walle 2021-04-06 2066 if (!ret) { 411b125c6ace1f Michael Walle 2021-04-06 2067 axienet_set_mac_address(ndev, mac_addr); 411b125c6ace1f Michael Walle 2021-04-06 2068 } else { d05a9ed5c3a773 Robert Hancock 2019-06-06 @2069 dev_warn(&pdev->dev, "could not find MAC address property: %ld\n", d05a9ed5c3a773 Robert Hancock 2019-06-06 2070 PTR_ERR(mac_addr)); ^ This should print "ret". 411b125c6ace1f Michael Walle 2021-04-06 2071 axienet_set_mac_address(ndev, NULL); 8a3b7a252dca9f Daniel Borkmann 2012-01-19 2072 } 8a3b7a252dca9f Daniel Borkmann 2012-01-19 2073 8a3b7a252dca9f Daniel Borkmann 2012-01-19 2074 lp->coalesce_count_rx = XAXIDMA_DFT_RX_THRESHOLD; 8a3b7a252dca9f Daniel Borkmann 2012-01-19 2075 lp->coalesce_count_tx = XAXIDMA_DFT_TX_THRESHOLD; --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org
[kbuild] Re: [mkp-scsi:for-next 304/324] drivers/scsi/smartpqi/smartpqi_sas_transport.c:97 pqi_sas_port_add_rphy() warn: variable dereferenced before check 'pqi_sas_port->device' (see line 95)
On Tue, Apr 13, 2021 at 10:33:57PM -0400, Martin K. Petersen wrote: > > Dan, > > > smatch warnings: > > drivers/scsi/smartpqi/smartpqi_sas_transport.c:97 pqi_sas_port_add_rphy() > > warn: variable dereferenced before check 'pqi_sas_port->device' (see line > > 95) > > Microchip: This is the second time this issue has been reported. Oops. Sorry, that's my bad. I didn't mean to report it twice. I've been catching up on email after a small vacation so my mind is a bit scattered. regards, dan carpenter ___ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org
[kbuild] Re: [RFC PATCH v2 3/4] cxl/mem: Add CDAT table reading from DOE
CC: kbuild-...@lists.01.org In-Reply-To: <20210413160159.935663-4-jonathan.came...@huawei.com> References: <20210413160159.935663-4-jonathan.came...@huawei.com> TO: Jonathan Cameron Hi Jonathan, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on pci/next] [also build test WARNING on linus/master v5.12-rc7] [cannot apply to next-20210413] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Jonathan-Cameron/PCI-Data-Object-Exchange-support-CXL-CDAT/20210414-000832 base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next :: branch date: 12 hours ago :: commit date: 12 hours ago config: x86_64-randconfig-m001-20210413 (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 Reported-by: Dan Carpenter smatch warnings: drivers/pci/pcie/doe.c:350 doe_statemachine_work() error: uninitialized symbol 'rc'. vim +/rc +350 drivers/pci/pcie/doe.c 9d119b6670629a Jonathan Cameron 2021-04-14 204 9d119b6670629a Jonathan Cameron 2021-04-14 205 static void doe_statemachine_work(struct work_struct *work) 9d119b6670629a Jonathan Cameron 2021-04-14 206 { 9d119b6670629a Jonathan Cameron 2021-04-14 207 struct delayed_work *w = to_delayed_work(work); 9d119b6670629a Jonathan Cameron 2021-04-14 208 struct pcie_doe *doe = container_of(w, struct pcie_doe, statemachine); 9d119b6670629a Jonathan Cameron 2021-04-14 209 struct pci_dev *pdev = doe->pdev; 9d119b6670629a Jonathan Cameron 2021-04-14 210 struct pcie_doe_task *task; 9d119b6670629a Jonathan Cameron 2021-04-14 211 bool abort; 9d119b6670629a Jonathan Cameron 2021-04-14 212 u32 val; 9d119b6670629a Jonathan Cameron 2021-04-14 213 int rc; 9d119b6670629a Jonathan Cameron 2021-04-14 214 9d119b6670629a Jonathan Cameron 2021-04-14 215 mutex_lock(&doe->tasks_lock); 9d119b6670629a Jonathan Cameron 2021-04-14 216 task = list_first_entry_or_null(&doe->tasks, struct pcie_doe_task, h); 9d119b6670629a Jonathan Cameron 2021-04-14 217 abort = doe->abort; 9d119b6670629a Jonathan Cameron 2021-04-14 218 doe->abort = false; 9d119b6670629a Jonathan Cameron 2021-04-14 219 mutex_unlock(&doe->tasks_lock); 9d119b6670629a Jonathan Cameron 2021-04-14 220 9d119b6670629a Jonathan Cameron 2021-04-14 221 if (abort) { 9d119b6670629a Jonathan Cameron 2021-04-14 222 /* 9d119b6670629a Jonathan Cameron 2021-04-14 223 * Currently only used during init - care needed if we want to generally 9d119b6670629a Jonathan Cameron 2021-04-14 224 * expose pcie_doe_abort() as it would impact queries in flight. 9d119b6670629a Jonathan Cameron 2021-04-14 225 */ 9d119b6670629a Jonathan Cameron 2021-04-14 226 WARN_ON(task); 9d119b6670629a Jonathan Cameron 2021-04-14 227 doe->state = DOE_WAIT_ABORT; 9d119b6670629a Jonathan Cameron 2021-04-14 228 pcie_doe_abort_start(doe); 9d119b6670629a Jonathan Cameron 2021-04-14 229 return; 9d119b6670629a Jonathan Cameron 2021-04-14 230 } 9d119b6670629a Jonathan Cameron 2021-04-14 231 9d119b6670629a Jonathan Cameron 2021-04-14 232 switch (doe->state) { 9d119b6670629a Jonathan Cameron 2021-04-14 233 case DOE_IDLE: 9d119b6670629a Jonathan Cameron 2021-04-14 234 if (task == NULL) 9d119b6670629a Jonathan Cameron 2021-04-14 235 return; 9d119b6670629a Jonathan Cameron 2021-04-14 236 9d119b6670629a Jonathan Cameron 2021-04-14 237 /* Nothing currently in flight so queue a task */ 9d119b6670629a Jonathan Cameron 2021-04-14 238 rc = pcie_doe_send_req(doe, task->ex); 9d119b6670629a Jonathan Cameron 2021-04-14 239 /* 9d119b6670629a Jonathan Cameron 2021-04-14 240 * The specification does not provide any guidance on how long some other 9d119b6670629a Jonathan Cameron 2021-04-14 241 * entity could keep the DOE busy, so try for 1 second then fail. 9d119b6670629a Jonathan Cameron 2021-04-14 242 * Busy handling is best effort only, because there is not way of avoiding 9d119b6670629a Jonathan Cameron 2021-04-14 243 * racing against another user of the DOE. 9d119b6670629a Jonathan Cameron 2021-04-14 244 */ 9d119b6670629a Jonathan Cameron 2021-04-14 245 if (rc == -EBUSY) { 9d119b6670629a Jonathan Cameron 2021-04-14 246 doe->busy_retries++; 9d119b6670629a
[kbuild] [linux-next:master 10444/12404] security/keys/trusted-keys/trusted_tpm2.c:38:25: warning: Either the condition '!scratch' is redundant or there is pointer arithmetic with NULL pointer. [nullP
CC: kbuild-...@lists.01.org CC: Linux Memory Management List TO: James Bottomley CC: Jarkko Sakkinen tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: dcf1b51d6b2ac5da234ae6883ed0e9422c339588 commit: 14676f1eb79660b6ee262644fa788a5c42ac19e4 [10444/12404] security: keys: trusted: use ASN.1 TPM2 key format for the blobs :: branch date: 18 hours ago :: commit date: 5 days ago compiler: hppa64-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot cppcheck possible warnings: (new ones prefixed by >>, may not real problems) >> security/keys/trusted-keys/trusted_tpm2.c:38:25: warning: Either the >> condition '!scratch' is redundant or there is pointer arithmetic with NULL >> pointer. [nullPointerArithmeticRedundantCheck] u8 *end_work = scratch + SCRATCH_SIZE; ^ security/keys/trusted-keys/trusted_tpm2.c:50:6: note: Assuming that condition '!scratch' is not redundant if (!scratch) ^ security/keys/trusted-keys/trusted_tpm2.c:38:25: note: Null pointer addition u8 *end_work = scratch + SCRATCH_SIZE; ^ vim +38 security/keys/trusted-keys/trusted_tpm2.c 14676f1eb79660 James Bottomley 2021-01-27 30 14676f1eb79660 James Bottomley 2021-01-27 31 static int tpm2_key_encode(struct trusted_key_payload *payload, 14676f1eb79660 James Bottomley 2021-01-27 32 struct trusted_key_options *options, 14676f1eb79660 James Bottomley 2021-01-27 33 u8 *src, u32 len) 14676f1eb79660 James Bottomley 2021-01-27 34 { 14676f1eb79660 James Bottomley 2021-01-27 35 const int SCRATCH_SIZE = PAGE_SIZE; 14676f1eb79660 James Bottomley 2021-01-27 36 u8 *scratch = kmalloc(SCRATCH_SIZE, GFP_KERNEL); 14676f1eb79660 James Bottomley 2021-01-27 37 u8 *work = scratch, *work1; 14676f1eb79660 James Bottomley 2021-01-27 @38 u8 *end_work = scratch + SCRATCH_SIZE; 14676f1eb79660 James Bottomley 2021-01-27 39 u8 *priv, *pub; 14676f1eb79660 James Bottomley 2021-01-27 40 u16 priv_len, pub_len; 14676f1eb79660 James Bottomley 2021-01-27 41 14676f1eb79660 James Bottomley 2021-01-27 42 priv_len = get_unaligned_be16(src) + 2; 14676f1eb79660 James Bottomley 2021-01-27 43 priv = src; 14676f1eb79660 James Bottomley 2021-01-27 44 14676f1eb79660 James Bottomley 2021-01-27 45 src += priv_len; 14676f1eb79660 James Bottomley 2021-01-27 46 14676f1eb79660 James Bottomley 2021-01-27 47 pub_len = get_unaligned_be16(src) + 2; 14676f1eb79660 James Bottomley 2021-01-27 48 pub = src; 14676f1eb79660 James Bottomley 2021-01-27 49 14676f1eb79660 James Bottomley 2021-01-27 50 if (!scratch) 14676f1eb79660 James Bottomley 2021-01-27 51 return -ENOMEM; 14676f1eb79660 James Bottomley 2021-01-27 52 14676f1eb79660 James Bottomley 2021-01-27 53 work = asn1_encode_oid(work, end_work, tpm2key_oid, 14676f1eb79660 James Bottomley 2021-01-27 54 asn1_oid_len(tpm2key_oid)); 14676f1eb79660 James Bottomley 2021-01-27 55 14676f1eb79660 James Bottomley 2021-01-27 56 if (options->blobauth_len == 0) { 14676f1eb79660 James Bottomley 2021-01-27 57 unsigned char bool[3], *w = bool; 14676f1eb79660 James Bottomley 2021-01-27 58 /* tag 0 is emptyAuth */ 14676f1eb79660 James Bottomley 2021-01-27 59 w = asn1_encode_boolean(w, w + sizeof(bool), true); 14676f1eb79660 James Bottomley 2021-01-27 60 if (WARN(IS_ERR(w), "BUG: Boolean failed to encode")) 14676f1eb79660 James Bottomley 2021-01-27 61 return PTR_ERR(w); 14676f1eb79660 James Bottomley 2021-01-27 62 work = asn1_encode_tag(work, end_work, 0, bool, w - bool); 14676f1eb79660 James Bottomley 2021-01-27 63 } 14676f1eb79660 James Bottomley 2021-01-27 64 14676f1eb79660 James Bottomley 2021-01-27 65 /* 14676f1eb79660 James Bottomley 2021-01-27 66* Assume both octet strings will encode to a 2 byte definite length 14676f1eb79660 James Bottomley 2021-01-27 67* 14676f1eb79660 James Bottomley 2021-01-27 68* Note: For a well behaved TPM, this warning should never 14676f1eb79660 James Bottomley 2021-01-27 69* trigger, so if it does there's something nefarious going on 14676f1eb79660 James Bottomley 2021-01-27 70*/ 14676f1eb79660 James Bottomley 2021-01-27 71 if (WARN(work - scratch + pub_len + priv_len + 14 > SCRATCH_SIZE, 14676f1eb79660 James Bottomley 2021-01-27 72"BUG: scratch buffer is too small")) 14676f1eb79660 James Bottomley 2021-01-27 73 return -EINVAL; 14676f1eb79660 James Bottomley 2021-01-27 74 14676f1eb79660 James Bottomley 2021-01-27 75 work = asn1_encode_integer(work, end_work, options->keyhandle); 14676f1eb79660 James Bottomley 2021-01-27 76 work = asn1_encode_octet_string(work, end_work, pub, pub_len); 14676f1eb79660 James Bottomley 2021-01-27 77 work
[kbuild] [peterz-queue:sched/core-sched 29/29] kernel/sched/core_sched.c:164 __sched_core_fat_cookie() error: uninitialized symbol 'task_cookie'.
CC: kbuild-...@lists.01.org TO: Peter Zijlstra tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core-sched head: a2f7c8bee1740fc80a75734268b065c96d68d29b commit: a2f7c8bee1740fc80a75734268b065c96d68d29b [29/29] sched: prctl() and cgroup interaction :: branch date: 7 hours ago :: commit date: 7 hours ago config: i386-randconfig-m021-20210413 (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 Reported-by: Dan Carpenter smatch warnings: kernel/sched/core_sched.c:164 __sched_core_fat_cookie() error: uninitialized symbol 'task_cookie'. kernel/sched/core_sched.c:165 __sched_core_fat_cookie() error: uninitialized symbol 'group_cookie'. vim +/task_cookie +164 kernel/sched/core_sched.c a2f7c8bee1740f Peter Zijlstra 2021-03-31 107 a2f7c8bee1740f Peter Zijlstra 2021-03-31 108 static unsigned long __sched_core_fat_cookie(struct task_struct *p, a2f7c8bee1740f Peter Zijlstra 2021-03-31 109 void **spare_fat, a2f7c8bee1740f Peter Zijlstra 2021-03-31 110 unsigned long cookie) a2f7c8bee1740f Peter Zijlstra 2021-03-31 111 { a2f7c8bee1740f Peter Zijlstra 2021-03-31 112 unsigned long task_cookie, group_cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 113 unsigned int p_type = cookie_type(p->core_cookie); a2f7c8bee1740f Peter Zijlstra 2021-03-31 114 unsigned int c_type = cookie_type(cookie); a2f7c8bee1740f Peter Zijlstra 2021-03-31 115 struct sched_core_fat_cookie *fat; a2f7c8bee1740f Peter Zijlstra 2021-03-31 116 unsigned long flags; a2f7c8bee1740f Peter Zijlstra 2021-03-31 117 struct rb_node *n; a2f7c8bee1740f Peter Zijlstra 2021-03-31 118 a2f7c8bee1740f Peter Zijlstra 2021-03-31 119 if (WARN_ON_ONCE(c_type == FAT_COOKIE)) a2f7c8bee1740f Peter Zijlstra 2021-03-31 120 return cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 121 a2f7c8bee1740f Peter Zijlstra 2021-03-31 122 if (!p_type || p_type == c_type) a2f7c8bee1740f Peter Zijlstra 2021-03-31 123 return cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 124 a2f7c8bee1740f Peter Zijlstra 2021-03-31 125 if (p_type == FAT_COOKIE) { a2f7c8bee1740f Peter Zijlstra 2021-03-31 126 fat = cookie_ptr(p->core_cookie); a2f7c8bee1740f Peter Zijlstra 2021-03-31 127 a2f7c8bee1740f Peter Zijlstra 2021-03-31 128 /* loose fat */ a2f7c8bee1740f Peter Zijlstra 2021-03-31 129 if (!cookie_ptr(cookie)) { a2f7c8bee1740f Peter Zijlstra 2021-03-31 130 if (c_type == TASK_COOKIE) a2f7c8bee1740f Peter Zijlstra 2021-03-31 131 cookie = fat->group_cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 132 else a2f7c8bee1740f Peter Zijlstra 2021-03-31 133 cookie = fat->task_cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 134 a2f7c8bee1740f Peter Zijlstra 2021-03-31 135 WARN_ON_ONCE(!cookie_ptr(cookie)); a2f7c8bee1740f Peter Zijlstra 2021-03-31 136 return sched_core_get_cookie(cookie); a2f7c8bee1740f Peter Zijlstra 2021-03-31 137 } a2f7c8bee1740f Peter Zijlstra 2021-03-31 138 a2f7c8bee1740f Peter Zijlstra 2021-03-31 139 /* other fat */ a2f7c8bee1740f Peter Zijlstra 2021-03-31 140 if (c_type == TASK_COOKIE) a2f7c8bee1740f Peter Zijlstra 2021-03-31 141 group_cookie = fat->group_cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 142 else a2f7c8bee1740f Peter Zijlstra 2021-03-31 143 task_cookie = fat->task_cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 144 a2f7c8bee1740f Peter Zijlstra 2021-03-31 145 } else { a2f7c8bee1740f Peter Zijlstra 2021-03-31 146 a2f7c8bee1740f Peter Zijlstra 2021-03-31 147 /* new fat */ a2f7c8bee1740f Peter Zijlstra 2021-03-31 148 if (p_type == TASK_COOKIE) a2f7c8bee1740f Peter Zijlstra 2021-03-31 149 task_cookie = p->core_cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 150 else a2f7c8bee1740f Peter Zijlstra 2021-03-31 151 group_cookie = p->core_cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 152 } a2f7c8bee1740f Peter Zijlstra 2021-03-31 153 a2f7c8bee1740f Peter Zijlstra 2021-03-31 154 if (c_type == TASK_COOKIE) a2f7c8bee1740f Peter Zijlstra 2021-03-31 155 task_cookie = cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 156 else a2f7c8bee1740f Peter Zijlstra 2021-03-31 157 group_cookie = cookie; a2f7c8bee1740f Peter Zijlstra 2021-03-31 158 a2f7c8bee1740f Peter Zijlstra 2021-03-31 159 fat = *spare_fat; a2f7c8bee1740f Peter Zijlstra 2021-03-31 160 if (WARN_ON_ONCE(!fat)) a2f7c8bee1740f Peter Zijlstra 2021-03-31 161 return cookie; a2f7c8bee1740f Peter Zij
[kbuild] [lee-linaro:android-3.18-preview 396/992] mm/mprotect.c:39:14: sparse: sparse: context imbalance in 'lock_pte_protection' - wrong count at exit
CC: kbuild-...@lists.01.org TO: Lee Jones tree: https://git.linaro.org/people/lee.jones/linux.git android-3.18-preview head: 6ba0539cefd299adcbcf8c6bf7db5f137ee09151 commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/992] scripts/dtc: Export YYLOC global declaration :: branch date: 3 hours ago :: commit date: 8 weeks ago config: arm64-randconfig-s031-20210413 (attached as .config) compiler: aarch64-linux-gcc (GCC) 5.5.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.3-280-g2cd6d34e-dirty git remote add lee-linaro https://git.linaro.org/people/lee.jones/linux.git git fetch --no-tags lee-linaro android-3.18-preview git checkout 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-5.5.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> mm/mprotect.c:39:14: sparse: sparse: context imbalance in >> 'lock_pte_protection' - wrong count at exit mm/mprotect.c:128:9: sparse: sparse: context imbalance in 'change_pte_range' - unexpected unlock In file included from arch/arm64/include/asm/mmu.h:24:0, from include/linux/mm_types.h:18, from include/linux/mm.h:16, from mm/mprotect.c:11: arch/arm64/include/asm/cpufeature.h: In function 'arm64_ftr_value': arch/arm64/include/asm/cpufeature.h:153:68: warning: signed and unsigned type in conditional expression [-Wsign-compare] cpuid_feature_extract_field_width(val, ftrp->shift, ftrp->width) : ^ In file included from include/linux/cgroup.h:11:0, from include/linux/hugetlb.h:8, from mm/mprotect.c:12: include/linux/sched.h: At top level: include/linux/sched.h:1067:42: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu); ^ In file included from include/linux/mempolicy.h:14:0, from include/linux/hugetlb.h:18, from mm/mprotect.c:12: include/linux/pagemap.h: In function 'fault_in_multipages_readable': include/linux/pagemap.h:633:16: warning: variable 'c' set but not used [-Wunused-but-set-variable] volatile char c; ^ -- >> sound/firewire/fireworks/fireworks_command.c:269:25: sparse: sparse: >> incorrect type in argument 1 (different base types) @@ expected unsigned >> int [usertype] *p @@ got restricted __be32 [usertype] * @@ sound/firewire/fireworks/fireworks_command.c:269:25: sparse: expected unsigned int [usertype] *p sound/firewire/fireworks/fireworks_command.c:269:25: sparse: got restricted __be32 [usertype] * In file included from arch/arm64/include/asm/mmu.h:24:0, from include/linux/mm_types.h:18, from include/linux/mm.h:16, from include/linux/scatterlist.h:6, from include/linux/dma-mapping.h:9, from include/linux/firewire.h:6, from sound/firewire/fireworks/./fireworks.h:14, from sound/firewire/fireworks/fireworks_command.c:9: arch/arm64/include/asm/cpufeature.h: In function 'arm64_ftr_value': arch/arm64/include/asm/cpufeature.h:153:68: warning: signed and unsigned type in conditional expression [-Wsign-compare] cpuid_feature_extract_field_width(val, ftrp->shift, ftrp->width) : ^ In file included from include/sound/core.h:26:0, from sound/firewire/fireworks/./fireworks.h:21, from sound/firewire/fireworks/fireworks_command.c:9: include/linux/sched.h: At top level: include/linux/sched.h:1067:42: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu); ^ In file included from sound/firewire/fireworks/./fireworks.h:23:0, from sound/firewire/fireworks/fireworks_command.c:9: include/sound/pcm.h: In function 'snd_pcm_chmap_substream': include/sound/pcm.h:1244:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (s->number == idx) ^ v
[kbuild] [peterz-queue:sched/core-sched 27/29] kernel/sched/core.c:5731:90: error: parameter 2 ('tg') has incomplete type
CC: kbuild-...@lists.01.org TO: Peter Zijlstra tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core-sched head: a2f7c8bee1740fc80a75734268b065c96d68d29b commit: 520bf37d416584c0aca5a190d922d4db145e5d91 [27/29] sched: Cgroup core-scheduling interface :: branch date: 3 hours ago :: commit date: 3 hours ago config: x86_64-allnoconfig (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 All errors (new ones prefixed by >>): kernel/sched/core.c: In function 'ttwu_stat': kernel/sched/core.c:3232:13: warning: variable 'rq' set but not used [-Wunused-but-set-variable] 3232 | struct rq *rq; | ^~ kernel/sched/core.c: At top level: >> kernel/sched/core.c:5731:90: error: parameter 2 ('tg') has incomplete type 5731 | static inline void sched_core_cgroup_online(struct task_group *parent, struct task_group tg) { } | ~~^~ >> kernel/sched/core.c:5731:20: error: function declaration isn't a prototype >> [-Werror=strict-prototypes] 5731 | static inline void sched_core_cgroup_online(struct task_group *parent, struct task_group tg) { } |^~~~ cc1: some warnings being treated as errors vim +5731 kernel/sched/core.c f337b79cee4299 Peter Zijlstra 2020-11-17 5729 520bf37d416584 Peter Zijlstra 2021-03-30 5730 static inline void sched_core_cgroup_free(struct task_group *tg) { } 520bf37d416584 Peter Zijlstra 2021-03-30 @5731 static inline void sched_core_cgroup_online(struct task_group *parent, struct task_group tg) { } 520bf37d416584 Peter Zijlstra 2021-03-30 5732 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org
[kbuild] [PATCH] xdp: fix itnull.cocci warnings
CC: kbuild-...@lists.01.org In-Reply-To: <20210413094133.3966678-3-liuhang...@gmail.com> References: <20210413094133.3966678-3-liuhang...@gmail.com> TO: Hangbin Liu TO: b...@vger.kernel.org CC: net...@vger.kernel.org CC: "Toke Høiland-Jørgensen" CC: Jiri Benc CC: Jesper Dangaard Brouer CC: Eelco Chaudron CC: a...@kernel.org CC: Daniel Borkmann CC: Lorenzo Bianconi CC: David Ahern From: kernel test robot kernel/bpf/devmap.c:667:9-12: ERROR: iterator variable bound on line 666 cannot be NULL Many iterators have the property that the first argument is always bound to a real list element, never NULL. Semantic patch information: False positives arise for some iterators that do not have this property, or in cases when the loop cursor is reassigned. The latter should only happen when the matched code is on the way to a loop exit (break, goto, or return). Generated by: scripts/coccinelle/iterators/itnull.cocci CC: Hangbin Liu Reported-by: kernel test robot Signed-off-by: kernel test robot --- url: https://github.com/0day-ci/linux/commits/Hangbin-Liu/xdp-extend-xdp_redirect_map-with-broadcast-support/20210413-174252 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master :: branch date: 8 hours ago :: commit date: 8 hours ago Please take the patch only if it's a positive warning. Thanks! devmap.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/bpf/devmap.c +++ b/kernel/bpf/devmap.c @@ -664,7 +664,7 @@ int dev_map_redirect_multi(struct net_de for (i = 0; i < dtab->n_buckets; i++) { head = dev_map_index_hash(dtab, i); hlist_for_each_entry_safe(dst, next, head, index_hlist) { - if (!dst || dst->dev->ifindex == exclude_ifindex) + if (dst->dev->ifindex == exclude_ifindex) continue; /* we only need n-1 clones; last_dst enqueued below */ ___ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org
[kbuild] Re: [PATCHv5 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support
CC: kbuild-...@lists.01.org In-Reply-To: <20210413094133.3966678-3-liuhang...@gmail.com> References: <20210413094133.3966678-3-liuhang...@gmail.com> TO: Hangbin Liu TO: b...@vger.kernel.org CC: net...@vger.kernel.org CC: "Toke Høiland-Jørgensen" CC: Jiri Benc CC: Jesper Dangaard Brouer CC: Eelco Chaudron CC: a...@kernel.org CC: Daniel Borkmann CC: Lorenzo Bianconi CC: David Ahern Hi Hangbin, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Hangbin-Liu/xdp-extend-xdp_redirect_map-with-broadcast-support/20210413-174252 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master :: branch date: 9 hours ago :: commit date: 9 hours ago config: i386-allyesconfig (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 Reported-by: Julia Lawall cocci warnings: (new ones prefixed by >>) >> kernel/bpf/devmap.c:667:9-12: ERROR: iterator variable bound on line 666 >> cannot be NULL Please review and possibly fold the followup patch. --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org
[kbuild] Re: [PATCH V4 2/2] net: ethernet: ravb: Enable optional refclk
Hi Adam, url: https://github.com/0day-ci/linux/commits/Adam-Ford/dt-bindings-net-renesas-etheravb-Add-additional-clocks/20210412-212824 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 6628ddfec7580882f11fdc5c194a8ea781fdadfa config: m68k-randconfig-m031-20210412 (attached as .config) compiler: m68k-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: drivers/net/ethernet/renesas/ravb_main.c:2254 ravb_probe() error: potentially dereferencing uninitialized 'priv'. vim +/priv +2254 drivers/net/ethernet/renesas/ravb_main.c c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2043 static int ravb_probe(struct platform_device *pdev) c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2044 { c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2045 struct device_node *np = pdev->dev.of_node; c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2046 struct ravb_private *priv; 22d4df8ff3a3cc drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2015-09-30 2047 enum ravb_chip_id chip_id; c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2048 struct net_device *ndev; c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2049 int error, irq, q; c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2050 struct resource *res; f51bdc236b6c58 drivers/net/ethernet/renesas/ravb_main.c Kazuya Mizuguchi 2016-04-03 2051 int i; c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2052 c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2053 if (!np) { c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2054 dev_err(&pdev->dev, c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2055 "this driver is required to be instantiated from device tree\n"); c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2056 return -EINVAL; c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2057 } c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2058 c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2059 /* Get base address */ c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2060 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2061 if (!res) { c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2062 dev_err(&pdev->dev, "invalid resource\n"); c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2063 return -EINVAL; c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2064 } c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2065 c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2066 ndev = alloc_etherdev_mqs(sizeof(struct ravb_private), c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2067 NUM_TX_QUEUE, NUM_RX_QUEUE); c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2068 if (!ndev) c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2069 return -ENOMEM; c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2070 4d86d381862714 drivers/net/ethernet/renesas/ravb_main.c Simon Horman 2017-10-04 2071 ndev->features = NETIF_F_RXCSUM; 4d86d381862714 drivers/net/ethernet/renesas/ravb_main.c Simon Horman 2017-10-04 2072 ndev->hw_features = NETIF_F_RXCSUM; 4d86d381862714 drivers/net/ethernet/renesas/ravb_main.c Simon Horman 2017-10-04 2073 c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2074 pm_runtime_enable(&pdev->dev); c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2075 pm_runtime_get_sync(&pdev->dev); c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2076 c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-06-11 2077 /* The Ether-specific entries in the device structure. */ c156633f135326 drivers/net/ethernet/renesas/ravb.c Sergei Shtylyov 2015-
[kbuild] [agd5f:s0ix-8 207/212] drivers/acpi/processor_idle.c:435 acpi_processor_power_verify() error: uninitialized symbol 'latency2'.
tree: https://gitlab.freedesktop.org/agd5f/linux.git s0ix-8 head: 050ed943b1107b59b68db42e0c50586ea5055ce8 commit: 026d186e4592c1ee9c1cb44295912d0294508725 [207/212] ACPI / idle: override and update c-state latency when not conformance with s0ix config: i386-randconfig-m021-20210413 (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 Reported-by: Dan Carpenter New smatch warnings: drivers/acpi/processor_idle.c:435 acpi_processor_power_verify() error: uninitialized symbol 'latency2'. drivers/acpi/processor_idle.c:435 acpi_processor_power_verify() error: uninitialized symbol 'latency3'. Old smatch warnings: drivers/acpi/processor_idle.c:77 set_max_cstate() warn: argument 3 to %ld specifier is cast from pointer vim +/latency2 +435 drivers/acpi/processor_idle.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 395 static int acpi_processor_power_verify(struct acpi_processor *pr) ^1da177e4c3f41 Linus Torvalds 2005-04-16 396 { ^1da177e4c3f41 Linus Torvalds 2005-04-16 397 unsigned int i; ^1da177e4c3f41 Linus Torvalds 2005-04-16 398 unsigned int working = 0; 026d186e4592c1 Prike.Liang 2021-02-26 399 u32 latency2, latency3; ^^ 6eb0a0fd059598 Venkatesh Pallipadi 2006-01-11 400 169a0abbe32813 Thomas Gleixner 2007-02-16 401 pr->power.timer_broadcast_on_state = INT_MAX; 6eb0a0fd059598 Venkatesh Pallipadi 2006-01-11 402 a0bf284bfedd6d Len Brown 2009-05-15 403 for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) { ^1da177e4c3f41 Linus Torvalds 2005-04-16 404 struct acpi_processor_cx *cx = &pr->power.states[i]; ^1da177e4c3f41 Linus Torvalds 2005-04-16 405 ^1da177e4c3f41 Linus Torvalds 2005-04-16 406 switch (cx->type) { ^1da177e4c3f41 Linus Torvalds 2005-04-16 407 case ACPI_STATE_C1: ^1da177e4c3f41 Linus Torvalds 2005-04-16 408 cx->valid = 1; ^1da177e4c3f41 Linus Torvalds 2005-04-16 409 break; ^1da177e4c3f41 Linus Torvalds 2005-04-16 410 ^1da177e4c3f41 Linus Torvalds 2005-04-16 411 case ACPI_STATE_C2: d22edd293ff3f1 Len Brown 2010-01-19 412 if (!cx->address) d22edd293ff3f1 Len Brown 2010-01-19 413 break; d22edd293ff3f1 Len Brown 2010-01-19 414 cx->valid = 1; 026d186e4592c1 Prike.Liang 2021-02-26 415 latency2 = cx->latency; ^^ ^1da177e4c3f41 Linus Torvalds 2005-04-16 416 break; ^1da177e4c3f41 Linus Torvalds 2005-04-16 417 ^1da177e4c3f41 Linus Torvalds 2005-04-16 418 case ACPI_STATE_C3: 026d186e4592c1 Prike.Liang 2021-02-26 419 latency3 = cx->latency; ^^^ ^1da177e4c3f41 Linus Torvalds 2005-04-16 420 acpi_processor_power_verify_c3(pr, cx); ^1da177e4c3f41 Linus Torvalds 2005-04-16 421 break; ^1da177e4c3f41 Linus Torvalds 2005-04-16 422 } 7e275cc4e8e20f Len Brown 2009-05-15 423 if (!cx->valid) 7e275cc4e8e20f Len Brown 2009-05-15 424 continue; ^1da177e4c3f41 Linus Torvalds 2005-04-16 425 7e275cc4e8e20f Len Brown 2009-05-15 426 lapic_timer_check_state(i, pr, cx); 7e275cc4e8e20f Len Brown 2009-05-15 427 tsc_check_state(cx->type); ^1da177e4c3f41 Linus Torvalds 2005-04-16 428 working++; ^1da177e4c3f41 Linus Torvalds 2005-04-16 429 } bd6633476922b7 Andi Kleen 2006-03-25 430 026d186e4592c1 Prike.Liang 2021-02-26 431 /* Some AMD BIOSes mistakenly have higher C2 latencies than C3 latencies. 026d186e4592c1 Prike.Liang 2021-02-26 432 * In order to properly support S0ix, the platform needs to not skip C states. 026d186e4592c1 Prike.Liang 2021-02-26 433 * Correct the latencies here. 026d186e4592c1 Prike.Liang 2021-02-26 434 */ 026d186e4592c1 Prike.Liang 2021-02-26 @435 if (acpi_processor_vendor_amd() && (latency2 >= latency3)) { Probably if you know a lot about AMD and ACPI specs then you can determine that these are initialized, but static checkers only see the code. 026d186e4592c1 Prike.Liang 2021-02-26 436 pr->power.states[2].latency = 18; 026d186e4592c1 Prike.Liang 2021-02-26 437
[kbuild] Re: [PATCH v2 13/16] mm: multigenerational lru: page reclaim
CC: kbuild-...@lists.01.org In-Reply-To: <20210413065633.2782273-14-yuz...@google.com> References: <20210413065633.2782273-14-yuz...@google.com> TO: Yu Zhao TO: linux...@kvack.org CC: Alex Shi CC: Andi Kleen CC: Andrew Morton CC: Linux Memory Management List CC: Benjamin Manes CC: Dave Chinner CC: Dave Hansen CC: Hillf Danton CC: Jens Axboe Hi Yu, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on tip/x86/core] [also build test WARNING on cgroup/for-next tip/x86/mm fuse/for-next tip/perf/core tip/sched/core linus/master v5.12-rc7] [cannot apply to hnaz-linux-mm/master next-20210413] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Yu-Zhao/Multigenerational-LRU-Framework/20210413-145844 base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 99cb64de36d5c9397a664808b92943e35bdce25e :: branch date: 11 hours ago :: commit date: 11 hours ago compiler: h8300-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot cppcheck possible warnings: (new ones prefixed by >>, may not real problems) mm/vmscan.c:4108:22: warning: Local variable kswapd shadows outer function [shadowFunction] struct task_struct *kswapd = NODE_DATA(nid)->kswapd; ^ mm/vmscan.c:3910:12: note: Shadowed declaration static int kswapd(void *p) ^ mm/vmscan.c:4108:22: note: Shadow variable struct task_struct *kswapd = NODE_DATA(nid)->kswapd; ^ mm/vmscan.c:5458:7: warning: Identical inner 'if' condition is always true. [identicalInnerCondition] if (!args) ^ mm/vmscan.c:5433:15: note: 'alloc' is assigned value '!args' here. bool alloc = !args; ^ mm/vmscan.c:5456:6: note: outer condition: alloc if (alloc) { ^ mm/vmscan.c:5458:7: note: identical inner condition: !args if (!args) ^ >> mm/vmscan.c:4710:12: warning: Possible null pointer dereference: args >> [nullPointer] int nid = args->node_id; ^ mm/vmscan.c:5945:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0 return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0; ^ mm/vmscan.c:5469:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0 last = get_next_mm(args, swappiness, &mm); ^ mm/vmscan.c:4801:32: note: Calling function 'reset_mm_stats', 3rd argument 'args' value is 0 reset_mm_stats(mm_list, last, args); ^ mm/vmscan.c:4710:12: note: Null pointer dereference int nid = args->node_id; ^ mm/vmscan.c:4711:32: warning: Possible null pointer dereference: args [nullPointer] int sid = sid_from_seq_or_gen(args->max_seq); ^ mm/vmscan.c:5945:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0 return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0; ^ mm/vmscan.c:5469:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0 last = get_next_mm(args, swappiness, &mm); ^ mm/vmscan.c:4801:32: note: Calling function 'reset_mm_stats', 3rd argument 'args' value is 0 reset_mm_stats(mm_list, last, args); ^ mm/vmscan.c:4711:32: note: Null pointer dereference int sid = sid_from_seq_or_gen(args->max_seq); ^ mm/vmscan.c:4724:28: warning: Possible null pointer dereference: args [nullPointer] sid = sid_from_seq_or_gen(args->max_seq + 1); ^ mm/vmscan.c:5945:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0 return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0; ^ mm/vmscan.c:5469:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0 last = get_next_mm(args, swappiness, &mm); ^ mm/vmscan.c:4801:32: note: Calling function 'reset_mm_stats', 3rd argument 'args' value is 0 reset_mm_stats(mm_list, last, args); ^ mm/vmscan.c:4724:28: note: Null pointer dereference sid = sid_from_seq_or_gen(args->max_seq + 1);
[kbuild] [PATCH] scsi: hisi_sas: fix platform_get_irq.cocci warnings
CC: kbuild-...@lists.01.org CC: Linux Memory Management List TO: Sergey Shtylyov CC: "Martin K. Petersen" CC: John Garry CC: "James E.J. Bottomley" CC: linux-s...@vger.kernel.org CC: linux-ker...@vger.kernel.org From: kernel test robot drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:1650:4-11: line 1650 is redundant because platform_get_irq() already prints an error drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:1669:3-10: line 1669 is redundant because platform_get_irq() already prints an error drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:1687:3-10: line 1687 is redundant because platform_get_irq() already prints an error Remove dev_err() messages after platform_get_irq*() failures Generated by: scripts/coccinelle/api/platform_get_irq.cocci Fixes: 6c11dc060427 ("scsi: hisi_sas: Fix IRQ checks") CC: Sergey Shtylyov Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: dcf1b51d6b2ac5da234ae6883ed0e9422c339588 commit: 6c11dc060427e07ca144eacaccd696106b361b06 [12286/12404] scsi: hisi_sas: Fix IRQ checks :: branch date: 6 hours ago :: commit date: 12 hours ago Please take the patch only if it's a positive warning. Thanks! hisi_sas_v1_hw.c |6 -- 1 file changed, 6 deletions(-) --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c @@ -1647,8 +1647,6 @@ static int interrupt_init_v1_hw(struct h for (j = 0; j < HISI_SAS_PHY_INT_NR; j++, idx++) { irq = platform_get_irq(pdev, idx); if (irq < 0) { - dev_err(dev, "irq init: fail map phy interrupt %d\n", - idx); return -ENOENT; } @@ -1666,8 +1664,6 @@ static int interrupt_init_v1_hw(struct h for (i = 0; i < hisi_hba->queue_count; i++, idx++) { irq = platform_get_irq(pdev, idx); if (irq < 0) { - dev_err(dev, "irq init: could not map cq interrupt %d\n", - idx); return -ENOENT; } @@ -1684,8 +1680,6 @@ static int interrupt_init_v1_hw(struct h for (i = 0; i < HISI_SAS_FATAL_INT_NR; i++, idx++) { irq = platform_get_irq(pdev, idx); if (irq < 0) { - dev_err(dev, "irq init: could not map fatal interrupt %d\n", - idx); return -ENOENT; } ___ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org
[kbuild] [linux-next:master 12286/12404] drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:1650:4-11: line 1650 is redundant because platform_get_irq() already prints an error
CC: kbuild-...@lists.01.org CC: Linux Memory Management List TO: Sergey Shtylyov CC: "Martin K. Petersen" tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: dcf1b51d6b2ac5da234ae6883ed0e9422c339588 commit: 6c11dc060427e07ca144eacaccd696106b361b06 [12286/12404] scsi: hisi_sas: Fix IRQ checks :: branch date: 6 hours ago :: commit date: 12 hours ago config: riscv-allmodconfig (attached as .config) compiler: riscv64-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Julia Lawall cocci warnings: (new ones prefixed by >>) >> drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:1650:4-11: line 1650 is redundant >> because platform_get_irq() already prints an error drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:1669:3-10: line 1669 is redundant because platform_get_irq() already prints an error drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:1687:3-10: line 1687 is redundant because platform_get_irq() already prints an error Please review and possibly fold the followup patch. --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org
[kbuild] drivers/platform/x86/panasonic-laptop.c:495:9: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
CC: kbuild-...@lists.01.org CC: linux-ker...@vger.kernel.org TO: Kenneth Chan CC: Hans de Goede tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 89698becf06d341a700913c3d89ce2a914af69a2 commit: 008563513348a5ab0324fb8976172fe56c939450 platform/x86: panasonic-laptop: Fix sticky key init bug date: 5 months ago :: branch date: 24 hours ago :: commit date: 5 months ago 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 vim +495 drivers/platform/x86/panasonic-laptop.c 709ee531c15303 drivers/misc/panasonic-laptop.c Harald Welte 2008-09-23 485 80373ad0edb53b drivers/platform/x86/panasonic-laptop.c Kenneth Chan 2020-08-22 486 static ssize_t sticky_key_show(struct device *dev, struct device_attribute *attr, 709ee531c15303 drivers/misc/panasonic-laptop.c Harald Welte 2008-09-23 487char *buf) 709ee531c15303 drivers/misc/panasonic-laptop.c Harald Welte 2008-09-23 488 { 709ee531c15303 drivers/misc/panasonic-laptop.c Harald Welte 2008-09-23 489 struct acpi_device *acpi = to_acpi_device(dev); 709ee531c15303 drivers/misc/panasonic-laptop.c Harald Welte 2008-09-23 490 struct pcc_acpi *pcc = acpi_driver_data(acpi); 709ee531c15303 drivers/misc/panasonic-laptop.c Harald Welte 2008-09-23 491 e253fb944d3335 drivers/platform/x86/panasonic-laptop.c Jean Delvare 2010-10-21 492 if (!acpi_pcc_retrieve_biosdata(pcc)) 709ee531c15303 drivers/misc/panasonic-laptop.c Harald Welte 2008-09-23 493 return -EIO; 709ee531c15303 drivers/misc/panasonic-laptop.c Harald Welte 2008-09-23 494 008563513348a5 drivers/platform/x86/panasonic-laptop.c Kenneth Chan 2020-08-22 @495 return snprintf(buf, PAGE_SIZE, "%u\n", pcc->sticky_key); 709ee531c15303 drivers/misc/panasonic-laptop.c Harald Welte 2008-09-23 496 } 709ee531c15303 drivers/misc/panasonic-laptop.c Harald Welte 2008-09-23 497 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org ___ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org
[kbuild] Re: [PATCH v2 12/16] mm: multigenerational lru: eviction
CC: kbuild-...@lists.01.org In-Reply-To: <20210413065633.2782273-13-yuz...@google.com> References: <20210413065633.2782273-13-yuz...@google.com> TO: Yu Zhao TO: linux...@kvack.org CC: Alex Shi CC: Andi Kleen CC: Andrew Morton CC: Linux Memory Management List CC: Benjamin Manes CC: Dave Chinner CC: Dave Hansen CC: Hillf Danton CC: Jens Axboe Hi Yu, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on tip/x86/core] [also build test WARNING on cgroup/for-next tip/x86/mm fuse/for-next tip/perf/core tip/sched/core linus/master v5.12-rc7] [cannot apply to hnaz-linux-mm/master next-20210412] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Yu-Zhao/Multigenerational-LRU-Framework/20210413-145844 base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 99cb64de36d5c9397a664808b92943e35bdce25e :: branch date: 7 hours ago :: commit date: 7 hours ago compiler: h8300-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot cppcheck possible warnings: (new ones prefixed by >>, may not real problems) mm/vmscan.c:4073:22: warning: Local variable kswapd shadows outer function [shadowFunction] struct task_struct *kswapd = NODE_DATA(nid)->kswapd; ^ mm/vmscan.c:3875:12: note: Shadowed declaration static int kswapd(void *p) ^ mm/vmscan.c:4073:22: note: Shadow variable struct task_struct *kswapd = NODE_DATA(nid)->kswapd; ^ >> mm/vmscan.c:5423:7: warning: Identical inner 'if' condition is always true. >> [identicalInnerCondition] if (!args) ^ mm/vmscan.c:5398:15: note: 'alloc' is assigned value '!args' here. bool alloc = !args; ^ mm/vmscan.c:5421:6: note: outer condition: alloc if (alloc) { ^ mm/vmscan.c:5423:7: note: identical inner condition: !args if (!args) ^ vim +/if +5423 mm/vmscan.c 4aa138b42a5c9f Yu Zhao 2021-04-13 5392 4aa138b42a5c9f Yu Zhao 2021-04-13 5393 /* Main function used by foreground, background and user-triggered aging. */ 4aa138b42a5c9f Yu Zhao 2021-04-13 5394 static bool walk_mm_list(struct lruvec *lruvec, unsigned long max_seq, 4aa138b42a5c9f Yu Zhao 2021-04-13 5395 struct scan_control *sc, int swappiness, struct mm_walk_args *args) 4aa138b42a5c9f Yu Zhao 2021-04-13 5396 { 4aa138b42a5c9f Yu Zhao 2021-04-13 5397 bool last; 4aa138b42a5c9f Yu Zhao 2021-04-13 5398 bool alloc = !args; 4aa138b42a5c9f Yu Zhao 2021-04-13 5399 struct mm_struct *mm = NULL; 4aa138b42a5c9f Yu Zhao 2021-04-13 5400 struct lrugen *lrugen = &lruvec->evictable; 4aa138b42a5c9f Yu Zhao 2021-04-13 5401 struct pglist_data *pgdat = lruvec_pgdat(lruvec); 4aa138b42a5c9f Yu Zhao 2021-04-13 5402 int nid = pgdat->node_id; 4aa138b42a5c9f Yu Zhao 2021-04-13 5403 struct mem_cgroup *memcg = lruvec_memcg(lruvec); 4aa138b42a5c9f Yu Zhao 2021-04-13 5404 struct lru_gen_mm_list *mm_list = get_mm_list(memcg); 4aa138b42a5c9f Yu Zhao 2021-04-13 5405 4aa138b42a5c9f Yu Zhao 2021-04-13 5406 VM_BUG_ON(max_seq > READ_ONCE(lrugen->max_seq)); 4aa138b42a5c9f Yu Zhao 2021-04-13 5407 4aa138b42a5c9f Yu Zhao 2021-04-13 5408 /* 4aa138b42a5c9f Yu Zhao 2021-04-13 5409 * For each walk of the mm_struct list of a memcg, we decrement the 4aa138b42a5c9f Yu Zhao 2021-04-13 5410 * priority of its lrugen. For each walk of all memcgs in kswapd, we 4aa138b42a5c9f Yu Zhao 2021-04-13 5411 * increment the priority of every lrugen. 4aa138b42a5c9f Yu Zhao 2021-04-13 5412 * 4aa138b42a5c9f Yu Zhao 2021-04-13 5413 * So if this lrugen has a higher priority (smaller value), it means 4aa138b42a5c9f Yu Zhao 2021-04-13 5414 * other concurrent reclaimers have walked its mm list, and we skip it 4aa138b42a5c9f Yu Zhao 2021-04-13 5415 * for this priority in order to balance the pressure on all memcgs. 4aa138b42a5c9f Yu Zhao 2021-04-13 5416 */ 4aa138b42a5c9f Yu Zhao 2021-04-13 5417 if (!mem_cgroup_disabled() && !cgroup_reclaim(sc) && 4aa138b42a5c9f Yu Zhao 2021-04-13 5418 sc->priority > atomic_read(&lrugen->priority)) 4aa138b42a5c9f Yu Zhao 2021-04-13 5419 return false; 4aa138b42a5c9f Yu Zhao 2021-04-13 5420 4aa138b42a5c9f Yu Zhao 2021-04-13 5421 if (alloc) { 4aa138b42a5c9f Yu Zhao 2021-04-13 5422 args = kvzalloc_node(sizeof(*args), GFP_KERNEL, nid); 4aa138b42a5c9f Yu Zhao 2021-04-13 @5423 if (!ar
[kbuild] [mkp-scsi:for-next 304/324] drivers/scsi/smartpqi/smartpqi_sas_transport.c:97 pqi_sas_port_add_rphy() warn: variable dereferenced before check 'pqi_sas_port->device' (see line 95)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next head: 857a80bbd7321161f986588160d97815d1b1206a commit: ec504b23df9d33260602affc50389cf070707c9b [304/324] scsi: smartpqi: Add phy ID support for the physical drives config: i386-randconfig-m021-20210406 (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 Reported-by: Dan Carpenter smatch warnings: drivers/scsi/smartpqi/smartpqi_sas_transport.c:97 pqi_sas_port_add_rphy() warn: variable dereferenced before check 'pqi_sas_port->device' (see line 95) vim +97 drivers/scsi/smartpqi/smartpqi_sas_transport.c 6c223761eb5482 Kevin Barnett 2016-06-27 87 6c223761eb5482 Kevin Barnett 2016-06-27 88 static int pqi_sas_port_add_rphy(struct pqi_sas_port *pqi_sas_port, 6c223761eb5482 Kevin Barnett 2016-06-27 89struct sas_rphy *rphy) 6c223761eb5482 Kevin Barnett 2016-06-27 90 { 6c223761eb5482 Kevin Barnett 2016-06-27 91struct sas_identify *identify; 6c223761eb5482 Kevin Barnett 2016-06-27 92 6c223761eb5482 Kevin Barnett 2016-06-27 93identify = &rphy->identify; 6c223761eb5482 Kevin Barnett 2016-06-27 94identify->sas_address = pqi_sas_port->sas_address; ec504b23df9d33 Murthy Bhat 2021-03-11 @95identify->phy_identifier = pqi_sas_port->device->phy_id; Dereference 3d46a59a191e81 Don Brace 2018-12-07 96 3d46a59a191e81 Don Brace 2018-12-07 @97if (pqi_sas_port->device && Checked too late. 3d46a59a191e81 Don Brace 2018-12-07 98 pqi_sas_port->device->is_expander_smp_device) { 3d46a59a191e81 Don Brace 2018-12-07 99 identify->initiator_port_protocols = SAS_PROTOCOL_SMP; 3d46a59a191e81 Don Brace 2018-12-07 100 identify->target_port_protocols = SAS_PROTOCOL_SMP; 3d46a59a191e81 Don Brace 2018-12-07 101} else { 6c223761eb5482 Kevin Barnett 2016-06-27 102 identify->initiator_port_protocols = SAS_PROTOCOL_STP; 6c223761eb5482 Kevin Barnett 2016-06-27 103 identify->target_port_protocols = SAS_PROTOCOL_STP; 3d46a59a191e81 Don Brace 2018-12-07 104} 6c223761eb5482 Kevin Barnett 2016-06-27 105 6c223761eb5482 Kevin Barnett 2016-06-27 106return sas_rphy_add(rphy); 6c223761eb5482 Kevin Barnett 2016-06-27 107 } --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org
[kbuild] [iio:testing 39/69] drivers/iio/cdc/ad7150.c:321 ad7150_write_event_config() error: uninitialized symbol 'ret'.
Hi Jonathan, First bad commit (maybe != root cause): tree: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git testing head: 448fea9496ae166a285858bf17eb5473eb77f4dc commit: 53e5aaab4c850f99a9eb3144cc29eccea7570c7f [39/69] iio:cdc:ad7150: Move driver out of staging. config: x86_64-randconfig-m001-20210405 (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 Reported-by: Dan Carpenter smatch warnings: drivers/iio/cdc/ad7150.c:321 ad7150_write_event_config() error: uninitialized symbol 'ret'. vim +/ret +321 drivers/iio/cdc/ad7150.c 531efd6aa09916 drivers/staging/iio/adc/ad7150.c Jonathan Cameron 2011-09-02 232 static int ad7150_write_event_config(struct iio_dev *indio_dev, c4f0ebd91467c7 drivers/staging/iio/cdc/ad7150.c Shraddha Barke 2015-12-29 233 const struct iio_chan_spec *chan, c4f0ebd91467c7 drivers/staging/iio/cdc/ad7150.c Shraddha Barke 2015-12-29 234 enum iio_event_type type, 1489d629a481dc drivers/staging/iio/cdc/ad7150.c Lars-Peter Clausen 2013-10-07 235 enum iio_event_direction dir, int state) 54c5be349bf66e drivers/staging/iio/adc/ad7150.c Barry Song 2010-10-27 236 { 531efd6aa09916 drivers/staging/iio/adc/ad7150.c Jonathan Cameron 2011-09-02 237 struct ad7150_chip_info *chip = iio_priv(indio_dev); 887b66527c6435 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 238 int ret; 54c5be349bf66e drivers/staging/iio/adc/ad7150.c Barry Song 2010-10-27 239 b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 240 /* b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 241 * There is only a single shared control and no on chip b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 242 * interrupt disables for the two interrupt lines. b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 243 * So, enabling will switch the events configured to enable b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 244 * whatever was most recently requested and if necessary enable_irq() b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 245 * the interrupt and any disable will disable_irq() for that b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 246 * channels interrupt. b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 247 */ b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 248 if (!state) { b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 249 if ((chip->int_enabled[chan->channel]) && b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 250 (type == chip->type) && (dir == chip->dir)) { b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 251 disable_irq(chip->interrupts[chan->channel]); b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 252 chip->int_enabled[chan->channel] = false; b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 253 } 531efd6aa09916 drivers/staging/iio/adc/ad7150.c Jonathan Cameron 2011-09-02 254 return 0; b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 255 } b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 256 531efd6aa09916 drivers/staging/iio/adc/ad7150.c Jonathan Cameron 2011-09-02 257 mutex_lock(&chip->state_lock); b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 258 if ((type != chip->type) || (dir != chip->dir)) { "ret" is not initialize on the false path. 887b66527c6435 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 259 int rising = (dir == IIO_EV_DIR_RISING); 887b66527c6435 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 260 u8 thresh_type, cfg, fixed; b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 261 b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 262 /* b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 263 * Need to temporarily disable both interrupts if b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 264 * enabled - this is to avoid races around changing b8546bdcf08e97 drivers/staging/iio/cdc/ad7150.c Jonathan Cameron 2021-03-14 265 * config and thresholds. b8546bdcf08e97 drivers/staging/iio/cdc
[kbuild] Re: [PATCH v2 3/5] hwmon: (max31790) Show 0 RPM/fault when input disabled
CC: kbuild-...@lists.01.org In-Reply-To: <20210413025948.901867-3-kuber...@cesnet.cz> References: <20210413025948.901867-3-kuber...@cesnet.cz> TO: "Václav Kubernát" CC: "Václav Kubernát" CC: Jean Delvare CC: Guenter Roeck CC: Jonathan Corbet CC: linux-hw...@vger.kernel.org CC: linux-...@vger.kernel.org CC: linux-ker...@vger.kernel.org Hi "Václav, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on hwmon/hwmon-next] [also build test WARNING on v5.12-rc7 next-20210413] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/V-clav-Kubern-t/hwmon-max31790-Rework-to-use-regmap/20210413-110343 base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next :: branch date: 9 hours ago :: commit date: 9 hours ago config: x86_64-randconfig-m001-20210413 (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 Reported-by: Dan Carpenter New smatch warnings: drivers/hwmon/max31790.c:191 max31790_read_fan() error: testing array offset 'channel' after use. Old smatch warnings: drivers/hwmon/max31790.c:199 max31790_read_fan() error: testing array offset 'channel' after use. vim +/channel +191 drivers/hwmon/max31790.c 1ab3f14415 Václav Kubernát 2021-04-13 159 54187ff9d766b2 Guenter Roeck 2016-07-01 160 static int max31790_read_fan(struct device *dev, u32 attr, int channel, 54187ff9d766b2 Guenter Roeck 2016-07-01 161 long *val) 195a4b4298a795 Il Han 2015-08-30 162 { 1ab3f14415 Václav Kubernát 2021-04-13 163 struct max31790_data *data = dev_get_drvdata(dev); 1ab3f14415 Václav Kubernát 2021-04-13 164 struct regmap *regmap = data->regmap; 1ab3f14415 Václav Kubernát 2021-04-13 165 int tach, fault; 195a4b4298a795 Il Han 2015-08-30 166 54187ff9d766b2 Guenter Roeck 2016-07-01 167 switch (attr) { 54187ff9d766b2 Guenter Roeck 2016-07-01 168 case hwmon_fan_input: 8f9d7c0c9b7368 Václav Kubernát 2021-04-13 169 if (!(data->fan_config[channel] & MAX31790_FAN_CFG_TACH_INPUT_EN)) 8f9d7c0c9b7368 Václav Kubernát 2021-04-13 170 return -ENODATA; 8f9d7c0c9b7368 Václav Kubernát 2021-04-13 171 1ab3f14415 Václav Kubernát 2021-04-13 172 tach = read_reg_word(regmap, MAX31790_REG_TACH_COUNT(channel)); 1ab3f14415 Václav Kubernát 2021-04-13 173 if (tach < 0) 1ab3f14415 Václav Kubernát 2021-04-13 174 return tach; 1ab3f14415 Václav Kubernát 2021-04-13 175 1ab3f14415 Václav Kubernát 2021-04-13 176 *val = RPM_FROM_REG(tach, get_tach_period(data->fan_dynamics[channel])); 54187ff9d766b2 Guenter Roeck 2016-07-01 177 return 0; 54187ff9d766b2 Guenter Roeck 2016-07-01 178 case hwmon_fan_target: 1ab3f14415 Václav Kubernát 2021-04-13 179 tach = read_reg_word(regmap, MAX31790_REG_TARGET_COUNT(channel)); 1ab3f14415 Václav Kubernát 2021-04-13 180 if (tach < 0) 1ab3f14415 Václav Kubernát 2021-04-13 181 return tach; 1ab3f14415 Václav Kubernát 2021-04-13 182 1ab3f14415 Václav Kubernát 2021-04-13 183 *val = RPM_FROM_REG(tach, get_tach_period(data->fan_dynamics[channel])); 54187ff9d766b2 Guenter Roeck 2016-07-01 184 return 0; 54187ff9d766b2 Guenter Roeck 2016-07-01 185 case hwmon_fan_fault: 8f9d7c0c9b7368 Václav Kubernát 2021-04-13 186 if (!(data->fan_config[channel] & MAX31790_FAN_CFG_TACH_INPUT_EN)) { 8f9d7c0c9b7368 Václav Kubernát 2021-04-13 187 *val = 0; 8f9d7c0c9b7368 Václav Kubernát 2021-04-13 188 return 0; 8f9d7c0c9b7368 Václav Kubernát 2021-04-13 189 } 8f9d7c0c9b7368 Václav Kubernát 2021-04-13 190 1ab3f14415 Václav Kubernát 2021-04-13 @191 if (channel > 6) 1ab3f14415 Václav Kubernát 2021-04-13 192 fault = read_reg_byte(regmap, MAX31790_REG_FAN_FAULT_STATUS2); 1ab3f14415 Václav Kubernát 2021-04-13 193 else 1ab3f14415 Václav Kubernát 2021-04-13 194 fault = read_reg_byte(regmap, MAX31790_REG_FAN_FAULT_STATUS1); 1ab3f14415 Václav Kubernát 2021-04-13 195 1ab3f14415 Václav Kubernát 2021-04-13 196 if (fault < 0) 1ab3f14415 Václav Kubernát 2021-04-13 197 return fault; 1ab3f14415 Václav Kube
[kbuild] [agd5f:s0ix-8 207/212] drivers/acpi/processor_idle.c:435 acpi_processor_power_verify() error: uninitialized symbol 'latency2'.
CC: kbuild-...@lists.01.org TO: "Prike.Liang" CC: Alex Deucher tree: https://gitlab.freedesktop.org/agd5f/linux.git s0ix-8 head: 050ed943b1107b59b68db42e0c50586ea5055ce8 commit: 026d186e4592c1ee9c1cb44295912d0294508725 [207/212] ACPI / idle: override and update c-state latency when not conformance with s0ix :: branch date: 11 hours ago :: commit date: 11 hours ago config: i386-randconfig-m021-20210413 (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 Reported-by: Dan Carpenter New smatch warnings: drivers/acpi/processor_idle.c:435 acpi_processor_power_verify() error: uninitialized symbol 'latency2'. drivers/acpi/processor_idle.c:435 acpi_processor_power_verify() error: uninitialized symbol 'latency3'. Old smatch warnings: drivers/acpi/processor_idle.c:77 set_max_cstate() warn: argument 3 to %ld specifier is cast from pointer vim +/latency2 +435 drivers/acpi/processor_idle.c 026d186e4592c1 Prike.Liang 2021-02-26 394 ^1da177e4c3f41 Linus Torvalds 2005-04-16 395 static int acpi_processor_power_verify(struct acpi_processor *pr) ^1da177e4c3f41 Linus Torvalds 2005-04-16 396 { ^1da177e4c3f41 Linus Torvalds 2005-04-16 397 unsigned int i; ^1da177e4c3f41 Linus Torvalds 2005-04-16 398 unsigned int working = 0; 026d186e4592c1 Prike.Liang 2021-02-26 399 u32 latency2, latency3; 6eb0a0fd059598 Venkatesh Pallipadi 2006-01-11 400 169a0abbe32813 Thomas Gleixner 2007-02-16 401 pr->power.timer_broadcast_on_state = INT_MAX; 6eb0a0fd059598 Venkatesh Pallipadi 2006-01-11 402 a0bf284bfedd6d Len Brown 2009-05-15 403 for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) { ^1da177e4c3f41 Linus Torvalds 2005-04-16 404 struct acpi_processor_cx *cx = &pr->power.states[i]; ^1da177e4c3f41 Linus Torvalds 2005-04-16 405 ^1da177e4c3f41 Linus Torvalds 2005-04-16 406 switch (cx->type) { ^1da177e4c3f41 Linus Torvalds 2005-04-16 407 case ACPI_STATE_C1: ^1da177e4c3f41 Linus Torvalds 2005-04-16 408 cx->valid = 1; ^1da177e4c3f41 Linus Torvalds 2005-04-16 409 break; ^1da177e4c3f41 Linus Torvalds 2005-04-16 410 ^1da177e4c3f41 Linus Torvalds 2005-04-16 411 case ACPI_STATE_C2: d22edd293ff3f1 Len Brown 2010-01-19 412 if (!cx->address) d22edd293ff3f1 Len Brown 2010-01-19 413 break; d22edd293ff3f1 Len Brown 2010-01-19 414 cx->valid = 1; 026d186e4592c1 Prike.Liang 2021-02-26 415 latency2 = cx->latency; ^1da177e4c3f41 Linus Torvalds 2005-04-16 416 break; ^1da177e4c3f41 Linus Torvalds 2005-04-16 417 ^1da177e4c3f41 Linus Torvalds 2005-04-16 418 case ACPI_STATE_C3: 026d186e4592c1 Prike.Liang 2021-02-26 419 latency3 = cx->latency; ^1da177e4c3f41 Linus Torvalds 2005-04-16 420 acpi_processor_power_verify_c3(pr, cx); ^1da177e4c3f41 Linus Torvalds 2005-04-16 421 break; ^1da177e4c3f41 Linus Torvalds 2005-04-16 422 } 7e275cc4e8e20f Len Brown 2009-05-15 423 if (!cx->valid) 7e275cc4e8e20f Len Brown 2009-05-15 424 continue; ^1da177e4c3f41 Linus Torvalds 2005-04-16 425 7e275cc4e8e20f Len Brown 2009-05-15 426 lapic_timer_check_state(i, pr, cx); 7e275cc4e8e20f Len Brown 2009-05-15 427 tsc_check_state(cx->type); ^1da177e4c3f41 Linus Torvalds 2005-04-16 428 working++; ^1da177e4c3f41 Linus Torvalds 2005-04-16 429 } bd6633476922b7 Andi Kleen 2006-03-25 430 026d186e4592c1 Prike.Liang 2021-02-26 431 /* Some AMD BIOSes mistakenly have higher C2 latencies than C3 latencies. 026d186e4592c1 Prike.Liang 2021-02-26 432 * In order to properly support S0ix, the platform needs to not skip C states. 026d186e4592c1 Prike.Liang 2021-02-26 433 * Correct the latencies here. 026d186e4592c1 Prike.Liang 2021-02-26 434 */ 026d186e4592c1 Prike.Liang 2021-02-26 @435 if (acpi_processor_vendor_amd() && (latency2 >= latency3)) { 026d186e4592c1 Prike.Liang 2021-02-26 436 pr->power.states[2].latency = 18; 026d186e4592c1 Prike.Liang 2021-02-26 437 pr->power.states[3].latency = 350; 026d186e4592c1 Prike.Liang 2021-02-26 438 } 026d186e4592c1 Prike.Liang 2021-02-26 439 918aae42aa9b61 Hidetoshi Seto 2009-12-14 440 lapic_tim