Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp495587imu; Fri, 16 Nov 2018 05:52:45 -0800 (PST) X-Google-Smtp-Source: AJdET5f8kw1xTfjUVMuMxLOS+Sw06UkVKDkGuReaiNJf38P1/DYXeVmRzhlNHsAbEhZSrArqQN1y X-Received: by 2002:a17:902:8a8e:: with SMTP id p14-v6mr10869340plo.133.1542376365759; Fri, 16 Nov 2018 05:52:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542376365; cv=none; d=google.com; s=arc-20160816; b=k7qs0IDWLM9QTNeSen+lZ0U7fw9khWRy1VIBzHc7FBgVDhf302t78Nd0F8taJVYWSN oZsuUpMbSaqSf7xHMshyV88iCkSV00mqNJfRR9fAoI9x3U/F6iV498AVsVv+fNGoOZUX 2QeWctf4kEUbERfFWu/K42cTEiMYHk0hrgia4zaMdP8FbKQKxiP9Zgi0Q2IZ7dVJO63P xW/9vMdgU+9/JfMZHvMZzq1oV2TAuTfkCplQX5CJYd/xkLEsryk7GrIOUiyrx2dLBo+E tk4P3RQYD+1kl0WYnld3e6gj+NCDeIQaIkZEpPZe+BJxsr8nOMEPJbU86VwI4ax9nZeP wrWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=ZdqpIzbFkPQzlVBown0X09UdvLKju7LDuR2NwT3ccIo=; b=r8p890cbBXzrTpzXpa39jMByKJsF2u1cuV2nmgqRSBR97YRi2a4j/b1KD3AD2uiUSU oX+X7A+O5SjqbEOx+AkdLYIGdlbx4BApnxZ4QeUQF8fqw7hp0VAPk8+ouMGKS7LnIhWZ KFwxVg9H0PwAcmLr7oBC3WL57tsIb7a8BtGm69IoKQeTbaMPbvj9ae45OwjmONxGxeIR 5EYQxzDbIj5FGifQcpGkVu9RzY0qZP2JoZ0SRqMV1nR0dtaF3DKJdTmASq7DtZaAmpFK cCfVm4xMTMxWMxzlU2RnSnU0Hr+NTAqDSuXUC3LCP8P/5EldiuslnWylHpngQWLFWqMA 7U6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=FgUQgKoe; 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 a13si27040479pgb.412.2018.11.16.05.52.31; Fri, 16 Nov 2018 05:52:45 -0800 (PST) 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=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=FgUQgKoe; 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 S2389857AbeKQADt (ORCPT + 99 others); Fri, 16 Nov 2018 19:03:49 -0500 Received: from a9-46.smtp-out.amazonses.com ([54.240.9.46]:56166 "EHLO a9-46.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727727AbeKQADt (ORCPT ); Fri, 16 Nov 2018 19:03:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1542376279; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Feedback-ID; bh=usYbOKfN2P/GqanvYtRo1vgK3cIqT07zZDpAGdpu0aQ=; b=FgUQgKoebQpEHj494IqY1Js1NtQ+sUo84c83SUQwUkIQByIJjAYvB7EN7Q6wJDuM cqymUisNjCwg2e1j6sBKLpP2N1f6vHC6AP9ElwkebPQR1ORocKSdVjl+fdyuGwwTfTE vtJChkEWQbLN6LL1bApvJ/Ulnox77Wg7mqVcIC28= Date: Fri, 16 Nov 2018 13:51:19 +0000 From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Masahiro Yamada cc: Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] slab: fix 'dubious: x & !y' warning from Sparse In-Reply-To: <1542346829-31063-1-git-send-email-yamada.masahiro@socionext.com> Message-ID: <010001671cca4b8b-2333373d-6b28-44e1-bca3-24570b8e0d2b-000000@email.amazonses.com> References: <1542346829-31063-1-git-send-email-yamada.masahiro@socionext.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SES-Outgoing: 2018.11.16-54.240.9.46 Feedback-ID: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 16 Nov 2018, Masahiro Yamada wrote: > diff --git a/include/linux/slab.h b/include/linux/slab.h > index 918f374..d395c73 100644 > --- a/include/linux/slab.h > +++ b/include/linux/slab.h > @@ -329,7 +329,7 @@ static __always_inline enum kmalloc_cache_type kmalloc_type(gfp_t flags) > * If an allocation is both __GFP_DMA and __GFP_RECLAIMABLE, return > * KMALLOC_DMA and effectively ignore __GFP_RECLAIMABLE > */ > - return type_dma + (is_reclaimable & !is_dma) * KMALLOC_RECLAIM; > + return type_dma + (is_reclaimable && !is_dma) * KMALLOC_RECLAIM; > } Ok then lets revert the initial patch whose point was to avoid a branch. && causes a branch again.