Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1225107pxb; Fri, 1 Apr 2022 07:52:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUzdJ16q+07THGLFyFSflWwE6kkvXAAXgFkoqapmnQIPGF+yMvAsb4Hf5jEgRBpgNezogu X-Received: by 2002:a17:907:1c20:b0:6e4:b753:93fc with SMTP id nc32-20020a1709071c2000b006e4b75393fcmr132086ejc.363.1648824742408; Fri, 01 Apr 2022 07:52:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648824742; cv=none; d=google.com; s=arc-20160816; b=t2i3D0HHkpbVMrAsQPKxRENf04XBHnBBxF76S9od0hdIev/U5VY0yPMADlw4jJS1oU /H5NM+NlnSXZbvINVRK6y9gcWlm3REVmCY83Typ8R3a1pU/0AmsJAwcy0c4mh8qK9PPv s2ZLVdwO49U0YBG/jOG6AuNvmnJlxMeJyADGD3WeANUursEENvAwVV8bpMTCvA8TJUvL 9Gr6nZubBob0uRV91wivLcnrnDw0CYoPlvctdMj03x+ftm/ax/RwcrrjrCDOJy1TnPYT 1jWvhfG4oLzmSmqJi1A1HZ1Jd0kUpcUz8Vh0dDozgXZbgClbsmz+9kj12M0fENLzlGjA T/Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=YuBl/f3XfwHvQa93+ozqB8r1E47ocLC0Rqnq4xYkwnk=; b=uiTZVD5fpQ/AiUqfvkB+m68bBVSAcmv/p+k1Q84sto2Gil3EN7n0LA87RLSwb8Hcp2 bJTXgbbl2TYEvn0b7ZO/cU92XGc0Hnkqz1XQVZrKupLNJCURCDIPy4vuhrAA/ZPPaqFc 0Bqie6Cu7iu9Cx3QFWb4nTJ5RCr0d6HSIvhCMK5aCQVFvI5nJsPnbfU0q0QHpQTh4YXz gQP9zHucFYtkjIMSo8rAzwaa4mjzZtT4LXK7w040zA5OS6HcpmYzEdiq4d+MK4wC24WL unFj9fov0NwRTTKkfjyIacW3xjqY7izZjytPi8II3zpamNgo05/JmSILo41gSkDhPMnc Zj3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dbN8gBG1; 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 r16-20020a170906a21000b006df7e82a9e4si1706222ejy.564.2022.04.01.07.51.56; Fri, 01 Apr 2022 07:52:22 -0700 (PDT) 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=dbN8gBG1; 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 S244438AbiDAGwE (ORCPT + 99 others); Fri, 1 Apr 2022 02:52:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232040AbiDAGwD (ORCPT ); Fri, 1 Apr 2022 02:52:03 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 043401C406D for ; Thu, 31 Mar 2022 23:50:14 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id i16so3756314ejk.12 for ; Thu, 31 Mar 2022 23:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=YuBl/f3XfwHvQa93+ozqB8r1E47ocLC0Rqnq4xYkwnk=; b=dbN8gBG1DIw4qjBl6ffKKyiZ7V0DgQNxcTQaaAqGEjfw0Y9CIT9fi7Yxtkil2lBF4d lluQ2qS4B+ycFFK++rnpr8ovwDcCPqugcI1ivBF9S81SZszy7IAwY0Z+t3mJL9Ks03Q4 Vd9bENcM5LH1zxOIi+WhsPx3iJLlM9GL14gr9cVZl0+El0PS+L1RpFYlKZB0zxZ8Fc7t bzSWeuiMTsirTmSq3nI38bxmdM8lFqR6C5kwCkJW3+FYyiW74VsGFpYdvES/ICY4THji GHC/j4/h+owfAUSYy+g1E2Xc39VT2PvDCcHrY3u5RfCsZ9tI+Cc/oVQE03IpYARaHWKt 9LBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=YuBl/f3XfwHvQa93+ozqB8r1E47ocLC0Rqnq4xYkwnk=; b=1lHxnUQ33CypKBtvNdDJVBrQAn/xlqz/M7TEZeLV/kNSKIIvxuPa+n8FzmF7YBKfqF 1cC49Al/uZ+5KtrNdYi32uI2CSiOrCJ41KGd4IUkiOcXp8cUOSI72c/m5iHRXvFDw/bk Kpp8KPMjQbwJcGGbpoBKL7ajU92W/MQaQ2lF9V9voCxMimsdP3FxesOMTjt5nDJ0tx7h NZUcjfs8ayIUfrov0EUDjhIv47e1i4pyhdCeWO0buL5XkHoaiJ8IYI2gOoYfiftJsf8a FRIg6v9xTimFC0v57aCbtz5BJdLbm9+MX/yWldxrqFE6mLDO3UERR9fX7Nr0k4ysQRPM fsyA== X-Gm-Message-State: AOAM530l0eLa8cdSySHhyHcBHYQHd0G92fu+5ynILFMyzFYbn6k8ej9Q d6+3azNso+gI0XkqVt/668Q= X-Received: by 2002:a17:907:6e0d:b0:6e0:59ae:21f1 with SMTP id sd13-20020a1709076e0d00b006e059ae21f1mr8351917ejc.362.1648795812369; Thu, 31 Mar 2022 23:50:12 -0700 (PDT) Received: from smtpclient.apple (i130160.upc-i.chello.nl. [62.195.130.160]) by smtp.gmail.com with ESMTPSA id m24-20020a170906161800b006d420027b63sm678937ejd.18.2022.03.31.23.50.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Mar 2022 23:50:11 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: [PATCH] staging: android: ashmem: remove usage of list iterator after the loop body From: Jakob Koschel In-Reply-To: Date: Fri, 1 Apr 2022 08:50:10 +0200 Cc: =?utf-8?Q?Arve_Hj=C3=B8nnev=C3=A5g?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , Hridya Valsaraju , Suren Baghdasaryan , Linux Kernel Mailing List , linux-staging@lists.linux.dev, Mike Rapoport , Brian Johannesmeyer , Cristiano Giuffrida , "Bos, H.J." Content-Transfer-Encoding: quoted-printable Message-Id: <7BBD57E4-287B-461B-BC5C-D2FF35865D39@gmail.com> References: <20220331213934.866804-1-jakobkoschel@gmail.com> To: Greg Kroah-Hartman X-Mailer: Apple Mail (2.3696.80.82.1.1) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 1. Apr 2022, at 07:38, Greg Kroah-Hartman = wrote: >=20 > On Thu, Mar 31, 2022 at 11:39:34PM +0200, Jakob Koschel wrote: >> In preparation to limit the scope of a list iterator to the list >> traversal loop, use a dedicated pointer to point to the found element >> [1]. >>=20 >> Before, the code implicitly used the head when no element was found >> when using &pos->list. Since the new variable is only set if an >> element was found, the head needs to be used explicitly if the >> variable is NULL. >>=20 >> Link: = https://lore.kernel.org/all/CAHk-=3DwgRr_D8CB-D9Kg-c=3DEHreAsk5SqXPwr9Y7k9= sA6cWXJ6w@mail.gmail.com/ [1] >> Signed-off-by: Jakob Koschel >> --- >> drivers/staging/android/ashmem.c | 21 ++++++++++++--------- >> 1 file changed, 12 insertions(+), 9 deletions(-) >=20 > What tree did you make this against? This file is no longer in Linus's > tree. Looks like the driver was removed just a few hours after I rebased. Feel free to just ignore this patch. >=20 > thanks, >=20 > greg k-h Thanks, Jakob