From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7BFC7EDE998 for ; Wed, 11 Sep 2024 07:41:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=QIX0xQS1IG/T/cOQFKfuFfdElJM5u9aaUa7ipLBJ/K0=; b=VQb/VRHK6lOnU6gHi00cI0prCT 8/uaNffZOE1r4LDRkZhbcrHtCF4iZQoBwq8vfG35GypkmTFcNPZJGlCVuJ/gJSEecK/HGtGjUHwEf BnG1/3G+fppy5oTtR/RU1t7VqR7cQUhitFTy0vOBS4sOqUMhi+xyiSobbExdjxg/IECqAdZfu12WG A3rGmidgE8RyNoukHX1CT/haAxZsn2ImZQV2gb+uPgZQ7mXk2BJb3kGK+OLiu2E+6wM8cJ870pTnT ePyPgYDfZIxZi/fOYsRwTnxybglB6IcwN25iIqiDYstYH1Vj2KtJDFK/wzl4x+/Lm4iIKW0wPPFVb NMBjkT3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soHyo-00000008UR5-07Np; Wed, 11 Sep 2024 07:41:34 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soHsu-00000008SXE-3dln for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2024 07:35:30 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-42cbface8d6so20844975e9.3 for ; Wed, 11 Sep 2024 00:35:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726040127; x=1726644927; darn=lists.infradead.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=QIX0xQS1IG/T/cOQFKfuFfdElJM5u9aaUa7ipLBJ/K0=; b=CGyvSmrHwIRnttWb/GKx5+wtGX8QU0eRTZQvkakojylwPCDKokSIhdk4Di0xwWjRBt UZjvSqhHjvjqdRlVFFyC5CK4Pb52GhYzYn6NOkxaKaOB30L3wIFXaWzIWykrjuMAL6AB e/RjKNgzCsSspVYKeqkp3DIL+TgwAFJEM0nbjCjmVO88xmA4nW/Arts+rA/VCgYX8wWD ke+InZ1p26uxb64fGBZGElyWSEJxSNBO+9IElm+BMIxxEJ1G+ZPomjcv4Uv4ymQqI5dq NJ6g3qhKJCyRyTR3FcHLbyj/yiBLo/Yt8ot04IYgE0TFsVn1MiDfRW7Up5PGzH6NLQTr cjUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726040127; x=1726644927; h=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=QIX0xQS1IG/T/cOQFKfuFfdElJM5u9aaUa7ipLBJ/K0=; b=s5XhgxvIlvAwtU2AXWTn74WCBHd4cwm4FdkdTnrlB2ge83idfWM5F+swttZCGogCt5 Bm4Db2OrhjRcKb6elc8D4HzoISPSNUm2c2Xkzd/DBYLybGHqDyRlQtEN+U1JcN529qW+ FC7b751tMjFOjFbAeHsyYBX97LiNBKPRifYGWHJbuJSggI3r5Ej/ompKIq91dWfBKRcE wrzeqX7kV3KlK5LYR+Rjt7ybRNL+QuGv4XCilSgCV5SA9typsFgUqVTq7E+17RM8owsE /btNWGidbrdi0WAQTr6f1z1QohYGvoYZAkNdJaO1P/M0I7fI/4d3bpy6Mq8BUq8HpPaq TTxQ== X-Gm-Message-State: AOJu0YwFQz3UDiJj7zGcUWGFUZ/iXNI0V7C3grgpUA1qMgwP7UDWHBut kJvXaqdt/3/GWX9hsm9GgD7MblCT2cDDZP67V7kMgR6MfV4QVJFK8qSlVPcGpgU= X-Google-Smtp-Source: AGHT+IFcDNv/fzqCLdSb8QEc0Bjj+tW3kIQTnZGOeQdPgmzbOoP+3gNObkB/XLipGz6Kkh9WsKu3mA== X-Received: by 2002:a5d:6186:0:b0:378:81aa:2653 with SMTP id ffacd0b85a97d-3789229d694mr11055452f8f.9.1726040126943; Wed, 11 Sep 2024 00:35:26 -0700 (PDT) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378956652e8sm10963188f8f.30.2024.09.11.00.35.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 00:35:26 -0700 (PDT) Date: Wed, 11 Sep 2024 10:35:23 +0300 From: Dan Carpenter To: Robin Murphy Cc: linux-arm-kernel@lists.infradead.org Subject: [bug report] perf: Add driver for Arm NI-700 interconnect PMU Message-ID: <3ef9d6a4-bb08-4496-9d20-4781fa4c8e8a@stanley.mountain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240911_003528_928176_012C51BC X-CRM114-Status: UNSURE ( 7.73 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello Robin Murphy, Commit 4d5a7680f2b4 ("perf: Add driver for Arm NI-700 interconnect PMU") from Sep 4, 2024 (linux-next), leads to the following Smatch static checker warning: drivers/perf/arm-ni.c:726 arm_ni_pmu_online_cpu() warn: 'cd' was set to NULL drivers/perf/arm-ni.c:738 arm_ni_pmu_offline_cpu() warn: 'cd' was set to NULL drivers/perf/arm-ni.c 719 static int arm_ni_pmu_online_cpu(unsigned int cpu, struct hlist_node *cpuhp_node) 720 { 721 struct arm_ni_cd *cd; 722 int node; 723 724 cd = hlist_entry_safe(cpuhp_node, struct arm_ni_cd, cpuhp_node); 725 node = dev_to_node(cd_to_ni(cd)->dev); There isn't any point in using the _safe() version of hlist_entry() unless we're going to check for NULL. --> 726 if (cpu_to_node(cd->cpu) != node && cpu_to_node(cpu) == node) 727 arm_ni_pmu_migrate(cd, cpu); 728 return 0; 729 } regards, dan carpenter