Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2483920imd; Fri, 2 Nov 2018 12:11:58 -0700 (PDT) X-Google-Smtp-Source: AJdET5e4QusjLPOYzVvdgJFtebYGDGRe8GgoIBxloftQEp3QHa1eDON4eDCXMapid+MYQZhF1zoA X-Received: by 2002:a63:ff16:: with SMTP id k22mr6661469pgi.244.1541185918257; Fri, 02 Nov 2018 12:11:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541185918; cv=none; d=google.com; s=arc-20160816; b=CaoK1Lat/bnSpaAdn17hm/vlF6wD99BdGVtVQuukDLEthl0Cu/Frh0w94W2zbpUbG2 MBD0EQFwBfZXburKEQnrtTDDECh/2x9yuADAHqwD83jM9KM9uhm5NZK/cyyh89QiSbbs FZOO1DWQYs5C4oJDfdO3brrnlVsxd+QOjw8tE4at1F4VkmE73i8Iv6TtgIW5kmju5JWl J0pxEgi9GSmHafOwLpwyDMpa/onCkOIw6OSF9XxIR6TZyCMLci2RJGMMhNR7zAijPzx1 zhNYFeHL/DgvVBFTbYX9rum8qaHSgbZjPeOgMes1RIFF2JsdfoJHaEyjqagoTMx7rdZF WRTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=EukwXm1V5NYg2ckA/hhEuwFZhmWjYxGuDHNjZCf6Ahg=; b=bzI0eQ9Z7F1xS12zHHB222NSIENXDbOp1WsyDuOZXqeNA5HC+CXmQweiFqmPv/oxEa Z+XZxbwZeIn/rQLSzJSAm46tzV08b0tlLy5qIq4Wvdjq6lyKYLjBKKCDX1MToutah+1M KSr15g3KIrF/91PpHjmT3V6RZ2vICicfAWci0zz4O1aHRART3r5cBpo/EfgXAMLENhla CREQGXG7LU0CHDzo89GNZrdH7C5exq7sF/LSR61bQrjWwfgC9cF9oXAfMtu+wnXKAGke Apgk8nebQBg7fRc/Ui8vwHwCZ8jNKcXdtZ+jWT2g1szDX9UCGp4BKpmM7yNFQXlX+0aj +SzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VOxMcp0i; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e17-v6si33136581pgb.19.2018.11.02.12.11.44; Fri, 02 Nov 2018 12:11:58 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VOxMcp0i; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728579AbeKCESU (ORCPT + 99 others); Sat, 3 Nov 2018 00:18:20 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:38631 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726016AbeKCESU (ORCPT ); Sat, 3 Nov 2018 00:18:20 -0400 Received: by mail-lj1-f195.google.com with SMTP id q186-v6so2664962ljb.5; Fri, 02 Nov 2018 12:09:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EukwXm1V5NYg2ckA/hhEuwFZhmWjYxGuDHNjZCf6Ahg=; b=VOxMcp0ik+J7Bm1PEs/RqAr/L2JJJdGJtbwfTPNJiZp7go/s0xnKHCd3VtvDQf2Fp0 8fr9qX2dhaYowxUTXtNbv1E0aplB9ENHwwdZrOHEM8K1t0iFbqiiJKzl9Zkx9PNPvRo5 kCRhbAFcJMu2EbLqUSTY7IYRADWjLMeFJZNdso44yONHGJVLp3bXoj4yYB7aMFCGU3T6 sarbO9P7Ijd9utUG5zYFcKi5C7aqSV0xCV0FAp8M+ZF/e8T1lowGXUbVIzIOenrWZX4D sdznmACPXWS2JNvNML67elV6SxRaAasslgcMh/iET+EC1x+sKqPSuGHQ6qvgCWlk7mUa j7UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EukwXm1V5NYg2ckA/hhEuwFZhmWjYxGuDHNjZCf6Ahg=; b=N+3L+2hLJhvRneXtzllj3+yYSw+DrYmJrDRaUpKL/DAGr2LAQWga5lMtjknA4SYRf4 t4c9oIhQnjfRZj6Bgw/K+ocIIM2reNU2bG7DGb6GLHhCZDfeL29K39nNgnMUr3lYjcwn L+sH0ZjyI1H/CIuSDfEoWMjXX1b+A77WHPzKmeFDdLZUS4eZcw2aVwl4LTcB5njDvm4y 22JrJ1uaDBybfCks6WOLE0Pqka5uGxux7jxVNbf0BcdliaEtDOTe3aUmdsEDbnxR+af9 tHZwfSk3g5HQPPD2bdgRbkPe8VAF2bSKpGhBRZPfcEE+yhBkbtiwpxMA29qJpnD8FI6q Ngvg== X-Gm-Message-State: AGRZ1gIYK12rf2sfEp0VimjnD6cOIWLGcoFN6G5IqbxgYAhip1a8IldD o3v5vs9gYIrNcQKJULivDvYc90RiHYSA495oJrc= X-Received: by 2002:a2e:2d01:: with SMTP id t1-v6mr7367016ljt.99.1541185798465; Fri, 02 Nov 2018 12:09:58 -0700 (PDT) MIME-Version: 1.0 References: <20181102152637.GA3105@hp-pavilion-15-notebook-pc-brajeswar> <20181102182905.3klrdw4dxapeoiib@tower> In-Reply-To: From: Souptick Joarder Date: Sat, 3 Nov 2018 00:43:18 +0530 Message-ID: Subject: Re: [PATCH] include/asm/cmpxchg.h: Remove duplicate header To: Matt Turner Cc: mcree@orcon.net.nz, Brajeswar Ghosh , rth@twiddle.net, ink@jurassic.park.msu.ru, parri.andrea@gmail.com, mingo@kernel.org, paulmck@linux.vnet.ibm.com, linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, Sabyasachi Gupta Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 3, 2018 at 12:31 AM Matt Turner wrote: > > On Fri, Nov 2, 2018 at 11:55 AM Souptick Joarder wrote: > > We run the static analyser "make includecheck" which list out files where > > duplicate headers can be removed and based on that we thought to remove > > from this file. Didn't understood about the existence of second include ?? > > > #define ____xchg(type, args...) __xchg ## type ## _local(args) > #define ____cmpxchg(type, args...) __cmpxchg ## type ## _local(args) > #include > [snip] > #undef ____xchg > #undef ____cmpxchg > #define ____xchg(type, args...) __xchg ##type(args) > #define ____cmpxchg(type, args...) __cmpxchg ##type(args) > #include > > asm/xchg.h has a comment at the top that says > > /* > * xchg/xchg_local and cmpxchg/cmpxchg_local share the same code > * except that local version do not have the expensive memory barrier. > * So this file is included twice from asm/cmpxchg.h. > */ Thanks Matt. Sorry for the noise. Is there any way to exclude it from static analyser that someone else will not do the same mistake in future ?