Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3326080imm; Sun, 1 Jul 2018 18:40:27 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeXIL7v6pryS42egYYdTJoox13VuJkPSiZGpioVHd5kKXleupljN2XXCj1lDJlWq+Frj81a X-Received: by 2002:a63:4386:: with SMTP id q128-v6mr13880919pga.353.1530495627601; Sun, 01 Jul 2018 18:40:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530495627; cv=none; d=google.com; s=arc-20160816; b=iO6f9uhxBYMOlI8gEtJpJpxePhtd+nEt+Uc/sDxrP7pStYkScjtEPFyaMXqbA9p8c7 gzDlPgPfo4FSw1EomqkAs8p82pjORmLz1q9qMA8HHB7NYaRSzjc+2axdGRjEzbLS1C7D QZK7E6NhFs7COzuR1fZhq2HzLmePB7k0fHYrzaymxBuLUzpyOLT5lusOu3IoAxZFKPqB qjKp+sRyCk26wv+7quGChpFoAqDSeewmtI1cNO7sFZjzAEnistb/kj3FYINpte/mooxg n8I2aZagtkXlPAUJVYXZEmmurhJQWEEG9lTfJSlIXKOJzuiT1nuoPtsOG/ZGuHpaz0iw 5Fwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:references :in-reply-to:subject:cc:date:to:to:from:arc-authentication-results; bh=1Cn91rMp2kvziDw2gAK5Hy0BXRFcfQU8ImoJFkOjxnQ=; b=Z9ZLV6tZEP3TLmKJrP4GahWPelcvHsAqNz+BG1ERS1FRQbAbICxDoDJo79b4BTbELc qzIl2b0Y5JPd3kfyyTSp423BOtnqLm+YwTjCJym+/TqJhCP7/DyJR2lFVU+yuT6Vbg0w VgKizPYGNQFHelp1TdbPO1OquaubjqsWwBPCSEvZ0KbBLnpaoQt3vNPtKTOSVt33/TnL RdIRzMf4J8t709Pcne54LJIUiQd+LZEKKtzP48wExxZboPQJyPabQ2+XNY/WlU1WuWVE 1zIFKOG0DNI7xptKo3bkPF9t7aynATJnc6dyJTsf6FMqHZd03jVwhCxxyLSVettzLR6J 4Xig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 71-v6si15955716plc.164.2018.07.01.18.40.13; Sun, 01 Jul 2018 18:40:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932719AbeGBBcd (ORCPT + 99 others); Sun, 1 Jul 2018 21:32:33 -0400 Received: from mx2.suse.de ([195.135.220.15]:54844 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932102AbeGBBcc (ORCPT ); Sun, 1 Jul 2018 21:32:32 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "To" Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 80C1BAE12; Mon, 2 Jul 2018 01:32:30 +0000 (UTC) From: NeilBrown To: Linux Kernel Network Developers To: Rishabh Bhatnagar , tgraf@suug.ch, linux-arm-msm@vger.kernel.org Date: Mon, 02 Jul 2018 11:32:22 +1000 Cc: herbert@gondor.apana.org.au, linux-kernel@vger.kernel.org, Rishabh Bhatnagar Subject: Re: [PATCH] lib: rhashtable: Correct self-assignment in rhashtable.c In-Reply-To: <1530493906-19711-1-git-send-email-rishabhb@codeaurora.org> References: <1530493906-19711-1-git-send-email-rishabhb@codeaurora.org> Message-ID: <87muva2zix.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable (added netdev@vger.kernel.org) On Sun, Jul 01 2018, Rishabh Bhatnagar wrote: > In file lib/rhashtable.c line 777, skip variable is assigned to > itself. The following error was observed: > > lib/rhashtable.c:777:41: warning: explicitly assigning value of > variable of type 'int' to itself [-Wself-assign] error, forbidden > warning: rhashtable.c:777 > This error was found when compiling with Clang 6.0. Change it to iter->sk= ip. > > Change-Id: I5abd1ce5ba76737a73bd6eca94b07b1bd5267523 > Signed-off-by: Rishabh Bhatnagar Thanks for catching that! Reviewed-by: NeilBrown Thanks, NeilBrown > --- > lib/rhashtable.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/rhashtable.c b/lib/rhashtable.c > index 9427b57..3109b2e 100644 > --- a/lib/rhashtable.c > +++ b/lib/rhashtable.c > @@ -774,7 +774,7 @@ int rhashtable_walk_start_check(struct rhashtable_ite= r *iter) > skip++; > if (list =3D=3D iter->list) { > iter->p =3D p; > - skip =3D skip; > + iter->skip =3D skip; > goto found; > } > } > --=20 > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAls5gKYACgkQOeye3VZi gbnaaA//X6cfLjJptNvnJ/mTpbJMfKFGXjlI1apdns2tBOaRN4/BCFzFMOrP7EAZ JzmW6Qy3eSv6ef1bDxCOhah09XaLzAIW+k51eTswAivo1TWvBL5PRFflwrExxUF8 gThb9E/mfGV519BhdxofCJYULqMynbGS3oMBKPq/obBRdMRcLImghuBadoMy6SYk mE31qgexatD8M1JZ4VCAKkSdG+5VMGZk7ZWiDle6898pZ2/3PWWBV1K5Xz4klvpO F2WWKoQ5VbOVQV/MIiCwoiOW+NtkhDLxtWaVY0ti8qZ/6u/KtLIVxPVIZBqETu73 sH/VDJZI/fCS69EE8M1zfxN+APEvy2RrIn3OKtZYVFGlFeH0cVzHYFFnT5nYNn31 oIpS6CkksAEqzXuSEkN6Z2/QPGx2d9DDJnjA+uj5qWFiUkoyph/Wc7InHVhxCLpV 8gAf4+WPgVPtXEqhZdazGeDV+1Mn1d/YMbEalVM4ZAjJ5GdK80WHYT8wunyta3kC 4ucBTyVEfpCYZjJVts1+8P3c3aoDSFB3gj9GsjzRiXqpM/fBDHfAtL4DwpTLY6gT f6IsaIpb6cvlb7PrDYdMkdVE0iv7ZdVkMtxDjnMXAjogXYKiNz45XXCeupvpMgpq t+mJPJe5Mc6XKEp9hYMlyD2f1UQ1qPiAd5WkDGtc9HNwaXNwrvg= =M+j9 -----END PGP SIGNATURE----- --=-=-=--