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 X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 643B0C4727C for ; Thu, 1 Oct 2020 08:56:54 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 04CBE20BED for ; Thu, 1 Oct 2020 08:56:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="H+R048pz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 04CBE20BED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 538C086C56; Thu, 1 Oct 2020 08:56:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ADYuGEYIyCId; Thu, 1 Oct 2020 08:56:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 21B2186C24; Thu, 1 Oct 2020 08:56:52 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id BF6F21BF4E6 for ; Thu, 1 Oct 2020 08:56:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B9E0386B30 for ; Thu, 1 Oct 2020 08:56:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CpOhmxZat9z4 for ; Thu, 1 Oct 2020 08:56:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by whitealder.osuosl.org (Postfix) with ESMTPS id 9971186B0B for ; Thu, 1 Oct 2020 08:56:49 +0000 (UTC) Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9F09B20B1F; Thu, 1 Oct 2020 08:56:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601542609; bh=+J+qcQm1lylyAZj+XzZr4MSDB+AbjdvfaTxhoz7fEV0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=H+R048pzi27LF30Xg+VMXG6eoTkCkZicDUvSYvFPl8Zbvf8S4lTEIidwYFJ6vt6Qz vXyYNfd4p89PTgO32X4jQi+pgznVI/vYqBQRbc38aZrYlrCSUhXdyPRUOXLc06IN/j 7G+ehx7ExGqhtI9oyAotdN3IhJR1a4zL9QoMykmA= Date: Thu, 1 Oct 2020 10:56:50 +0200 From: Greg Kroah-Hartman To: Dan Carpenter Subject: Re: [PATCH] staging: vchiq: Fix list_for_each exit tests Message-ID: <20201001085650.GA1832570@kroah.com> References: <20200928091103.GC377727@mwanda> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200928091103.GC377727@mwanda> X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , devel@driverdev.osuosl.org, Arnd Bergmann , Marcelo Diop-Gonzalez , kernel-janitors@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Jamal Shareef , Nicolas Saenz Julienne Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" On Mon, Sep 28, 2020 at 12:11:03PM +0300, Dan Carpenter wrote: > This code code here used to be list_for_each() and after the loop then > the "entry" pointer was non-NULL if we found the correct entry or NULL > if we couldn't find it. Then we changed the code to use list_for_each_entry() > and so now the "entry" pointer is always non-NULL when we exit the loop. > > I have introduced a new "found" variable to say if we found the correct > enty or not. I fixed one test by making it an else statement because > that was more readable than testing "if (!found)". > > Fixes: 46e4b9ec4fa4 ("staging: vchiq_arm: use list_for_each_entry when accessing bulk_waiter_list") > Signed-off-by: Dan Carpenter > --- > .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) This doesn't apply against my tree, what branch did you make it against? thanks, greg k-h _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel