Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1725629rwb; Thu, 10 Nov 2022 22:24:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf5nIN71+GqG3fKeOjc7GEKKxjibGHC1HOX/W9ZtpHeF4L5lHV+Gi9NgSrQJ2ATRLmB/mfVu X-Received: by 2002:a50:d485:0:b0:461:af68:9bcd with SMTP id s5-20020a50d485000000b00461af689bcdmr258766edi.67.1668147850167; Thu, 10 Nov 2022 22:24:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668147850; cv=none; d=google.com; s=arc-20160816; b=ALslqF+Z4PIbsXfV13WS5m1UokhhX9Ym5S7z5jjdUoRXHuKG0fQi2lPtrsrPwpF1FL +XNzXsl/75xSuWYy2Pw3vhZLZy+CzFH2XTPW6X1bWX53HjH5EW/DlhVb5tAv3KvFm1HJ vTjApe/W6N8+9LnoIT9wnKo2w4NZgBu1p798avS2SQymiYEZpYQZz2nmw1m/kZR28K8U RVDX9ksI/sKo3OCX5XyEtYemfHpVKVg7ujzgoDCAN/05HjP498ZVv9WEnpBkQF9fLUVW yMiqJLh2glvUrg3vSrCAKudVxEUAp58sW3vn721t+uY7RHhH6NsU42UkHti4EaeBzM2K 0INw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=B94q4jNiGCMWVtJXsHfPt5LdUhSURj2oOrD7tCm/2SA=; b=DqODwDijLVH+g/AhAJpAkWXC7PoY7QwJhgh16M7JNmwsCUDeLcRXOI4fToV8HAN/uz MySrnhQ1CVoWKRooOHJDxRUNbk+IKL5JDz7Fk0Bv0vGxoT4CCxkB9QwnCO7l3lrsao9P ZKqRMpZTn1C0c3G5ss6yD4SSb2NjrWK6jPQsHDZkDyNcxCNxUf5KDNBcaDGFGI9VUn5H tBydbAiLCclNX7/2djU4eVcVypzPgNbwyMgZnpTqsUTf41L9PlBsJYugeHHL5EMoNh3k Dj9s63wgnovNry2K/SKxGEW8fNLvJ60Huv0NtiJ4lp4Pk4PjtfFgQx1q64n4YAp+Sgdv MMyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ET0NmDoN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd11-20020a1709069b8b00b0078d4cf8de04si1395371ejc.380.2022.11.10.22.23.48; Thu, 10 Nov 2022 22:24:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ET0NmDoN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232773AbiKKGPT (ORCPT + 92 others); Fri, 11 Nov 2022 01:15:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232775AbiKKGPQ (ORCPT ); Fri, 11 Nov 2022 01:15:16 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5C1913FB8; Thu, 10 Nov 2022 22:15:14 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id h133-20020a1c218b000000b003cf4d389c41so4944727wmh.3; Thu, 10 Nov 2022 22:15:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=B94q4jNiGCMWVtJXsHfPt5LdUhSURj2oOrD7tCm/2SA=; b=ET0NmDoNZJqG4JRrhaqz15lZlQbETJs+3yutHAnV3UNX/vUL0aGEkXLcttdT0JIbPJ nDK0jKpexehUZ4TTaTvL3Mg1W4txYCCgGsloVUNEBwXvnglq/8m6rZsOO2hWzmovGaOq TGWnQDplZwjHS/tFsIuAfsfJ+DhXKjd9gqKihnk0kuByEr6TB5AecL42B2RBo1O8WFNK p8OQ3NjtZ8ojjq4HMtk5Xnb1Eh9iH29DKTvxbGyyNMmGOLDlx3HLsshhbU4fsygTL7rV CtpUKAIM37ej5931tEc713uuBuOiOVihugvYgENAbur406B2jxUmXC+NK03QdIX5Cima SMAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=B94q4jNiGCMWVtJXsHfPt5LdUhSURj2oOrD7tCm/2SA=; b=pEgJ/LxjvN5ZPiZ+8lx1CL2FagxqpOnudMk/d6hrxuvbXfUrYM4rQPXPbV0JlGmHXP R+lazr3rhsw2/324O3F+JanJgdDn/GMFr8buxwhy7SPMn+P4NAgvUSVwKAVZQFGxMU1Z zjvqsgYfiNlvegX5kopMSSBJlS0Y1SvnI1/y8W8hmJgC6NxatiorshbZQQbvGyNAmCaa wCHbRaIUpGobI4jA65z2O59u35v+cNHr599nt81dXE8V3D6mnlnXE8fCdhmD8n5Nxlz9 Xkmx0pzlc0q/bxn809uIiSvFb8aFYZ7vEYUSvTUyrdDElMU/ghKUoplvfVRLWuK47M+S 4XWQ== X-Gm-Message-State: ANoB5pmy/z9T6IMaigz0LxOIE0XqDr4kFtqXQkF2RhkvFrrkSMQUNvw2 nAJutlS+Dr2Zghj7V012VqU= X-Received: by 2002:a05:600c:2d05:b0:3b4:8603:e2ae with SMTP id x5-20020a05600c2d0500b003b48603e2aemr154973wmf.148.1668147313345; Thu, 10 Nov 2022 22:15:13 -0800 (PST) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id az11-20020a05600c600b00b003b4cba4ef71sm7685721wmb.41.2022.11.10.22.15.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 22:15:12 -0800 (PST) Date: Fri, 11 Nov 2022 09:15:10 +0300 From: Dan Carpenter To: oe-kbuild@lists.linux.dev, Ivaylo Dimitrov , sre@kernel.org Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, tony@atomide.com, philipp@uvos.xyz, Ivaylo Dimitrov Subject: Re: [PATCH 1/3] power: cpcap-battery: Do not issue low signal too frequently Message-ID: <202211111240.LORXimo8-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1667647544-12945-2-git-send-email-ivo.g.dimitrov.75@gmail.com> X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ivaylo, https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Ivaylo-Dimitrov/power-supply-cpcap-battery-improvements/20221105-192758 base: https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next patch link: https://lore.kernel.org/r/1667647544-12945-2-git-send-email-ivo.g.dimitrov.75%40gmail.com patch subject: [PATCH 1/3] power: cpcap-battery: Do not issue low signal too frequently config: m68k-randconfig-m041-20221110 compiler: m68k-linux-gcc (GCC) 12.1.0 If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Reported-by: Dan Carpenter smatch warnings: drivers/power/supply/cpcap-battery.c:1084 cpcap_battery_lowbph_enable() warn: iterator used outside loop: 'd' vim +/d +1084 drivers/power/supply/cpcap-battery.c ce48d112324af4 Ivaylo Dimitrov 2022-11-05 1072 static void cpcap_battery_lowbph_enable(struct work_struct *work) ce48d112324af4 Ivaylo Dimitrov 2022-11-05 1073 { ce48d112324af4 Ivaylo Dimitrov 2022-11-05 1074 struct delayed_work *d_work = to_delayed_work(work); ce48d112324af4 Ivaylo Dimitrov 2022-11-05 1075 struct cpcap_battery_ddata *ddata = container_of(d_work, ce48d112324af4 Ivaylo Dimitrov 2022-11-05 1076 struct cpcap_battery_ddata, low_irq_work); ce48d112324af4 Ivaylo Dimitrov 2022-11-05 1077 struct cpcap_interrupt_desc *d; ce48d112324af4 Ivaylo Dimitrov 2022-11-05 1078 ce48d112324af4 Ivaylo Dimitrov 2022-11-05 1079 list_for_each_entry(d, &ddata->irq_list, node) { ce48d112324af4 Ivaylo Dimitrov 2022-11-05 1080 if (d->action == CPCAP_BATTERY_IRQ_ACTION_BATTERY_LOW) ce48d112324af4 Ivaylo Dimitrov 2022-11-05 1081 break; ce48d112324af4 Ivaylo Dimitrov 2022-11-05 1082 } ce48d112324af4 Ivaylo Dimitrov 2022-11-05 1083 ce48d112324af4 Ivaylo Dimitrov 2022-11-05 @1084 enable_irq(d->irq); If we exit the loop without hitting a break then "d" is not a valid pointer and "enable_irq(d->irq);" will do something bad. ce48d112324af4 Ivaylo Dimitrov 2022-11-05 1085 } -- 0-DAY CI Kernel Test Service https://01.org/lkp