Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3019190pxp; Tue, 8 Mar 2022 06:22:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxNRnnpwACw4x236qSyihbX86kygH2m0pCqNFnScdQuZ7UpQpDBil0NrPicPdrDlOt7sF1o X-Received: by 2002:a17:906:58d6:b0:6da:bc08:af7 with SMTP id e22-20020a17090658d600b006dabc080af7mr13551662ejs.537.1646749367964; Tue, 08 Mar 2022 06:22:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646749367; cv=none; d=google.com; s=arc-20160816; b=OEcpSgmFH2Ta7COFBgrK+dab9UDCrApn6RC7SWrcBtWpUOj0IaiDWi+BsLfZvnozpQ FKB1znBTUHp6ly5yngdpBzW2dFYW0PxAAnUD7XZ075cZK2lnFpG+UIB+/BciprLcrG+f opkyer4KYRbZyTAimz3WjCEIyDNzyZ9y/jOIr6FlDxBTtH9wmxqMm3Bm9NaFztjIMuOK keRo54iKgsQKYW+m15P7eVjER4+H6wmhYpNJL5pOiGorxI6cDL/h3+Ogx7tvJDI2uVNA tq0Hf98zc3/S8X+CVbjTTP6RtwT+Su9mvCUZWUkIadKcNSzY/DgHjQ3yMZjiFxgwG9sd Up1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from; bh=kzC3Klv9pyxhbleP+QNiQG5HFJEe7+un3SVpw2m5eIA=; b=KBt9slxz+8bQ6JkfsgKwwOEgsbMSdXrGY38auIRsaPmZQ+4AFyQiX6wsQUt8aekC/E rZ9U6g3vJuSNnWbqfbCJsOTz+8Ic3iqxzzLB2eNN8oGUE/Pn7niai9cLYlm3yVWvj+So zB+lm8ZiHkvwl+jk6kqleivwn95Rzuy/7xHboXOD8k6UfwwWt1qSj47+19yG3Y82WdYL aGUi9oQuO+BIdM7OoelQ2RALjtlcQS8JKotoOtNSJuiByqIonfuncRyduINZkXLWV9n9 ghHC3XQexYD/XC71iFYynp+mjP/6QjUI9mHuw4VBm1QFCoj4MAWdefEp9jPobdd2skDC SNMQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f3-20020a50a6c3000000b00410a2edbf93si10120653edc.278.2022.03.08.06.22.23; Tue, 08 Mar 2022 06:22:47 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346767AbiCHMTA (ORCPT + 99 others); Tue, 8 Mar 2022 07:19:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346766AbiCHMSz (ORCPT ); Tue, 8 Mar 2022 07:18:55 -0500 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 684413207B for ; Tue, 8 Mar 2022 04:17:57 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4KCZ8z4PxKz4xcl; Tue, 8 Mar 2022 23:17:55 +1100 (AEDT) From: Michael Ellerman To: Jakob Koschel , Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, Paul Mackerras , linux-kernel@vger.kernel.org, Benjamin Herrenschmidt , Kumar Gala In-Reply-To: <20220228142434.576226-1-jakobkoschel@gmail.com> References: <20220228142434.576226-1-jakobkoschel@gmail.com> Subject: Re: [PATCH] powerpc/sysdev: fix incorrect use to determine if list is empty Message-Id: <164674126479.3322453.5888213344645127953.b4-ty@ellerman.id.au> Date: Tue, 08 Mar 2022 23:07:44 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Mon, 28 Feb 2022 15:24:33 +0100, Jakob Koschel wrote: > 'gtm' will *always* be set by list_for_each_entry(). > It is incorrect to assume that the iterator value will be NULL if the > list is empty. > > Instead of checking the pointer it should be checked if > the list is empty. > > [...] Applied to powerpc/next. [1/1] powerpc/sysdev: fix incorrect use to determine if list is empty https://git.kernel.org/powerpc/c/fa1321b11bd01752f5be2415e74a0e1a7c378262 cheers