Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp564929ybj; Thu, 7 May 2020 02:21:02 -0700 (PDT) X-Google-Smtp-Source: APiQypJAh8coadVoa3G0a+TRjdNYd/N2FTNzMg+drHjNssq4kIptJbiLf2hlJTGceH3Xbce7Yl22 X-Received: by 2002:a17:906:1f16:: with SMTP id w22mr11393606ejj.327.1588843262536; Thu, 07 May 2020 02:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588843262; cv=none; d=google.com; s=arc-20160816; b=rZnLA2G3ZYnvhfLygaEkkDSNyl/fBiBAd/u/3n5z06uJjzr2h3hEKmCPstg7X+lRw8 iSZXS6Du3wfjCJOGRl/4RD8y7+TZi3lK8AtyhDXtPUktj5T/tFhwHk4xRtVsrSSjK2eQ yeNqkCbHTZdJm5IEpEtK6LvvbLgXr+lELZpK6LwYpW3+nqd9gPc75VzF8qxGDparFWfV hDO6kqMO7RY0M/vlmuGc2ryIYysKZdKYAse67R4jPC3h7J2kyMW89+sfkJIMgndqbOFV P2gNiMYdn5qknnX/vEZKDbYqy50uhJXBrv8lMHwGPfNu1yDOVTP4lR6Bh3BbYW07EPQu MBJg== 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=NsGXZKVjnwITEukQUNn3zovirkspDit08UiRlVwi+Ws=; b=sHsl5eMylCwfsiSmzCJwWPbVhQYMx+cAyeQAwnhkeCg0La7mDB4cVYsiiDc4kOxM/P aD24jUkZarTpAAtztmKaTJ+BsojtPebGwwhfFUYikHP+MpdQ7YIBW88Da2ypR0fnttvB F9556c6XGy9abv8cZcuyR+ZPVUcWyYvye0U3bhTwYYIr4XIYR3EJB864TF5JfL4agc27 dQvNfQMdwoOwahJBuxdFz7cHxGv1jA1/gOkafPhDNNIALO9prEEgGjVfP/nxMUjYDdHX bHNWjL90Nw3eAdAhaS0+g+Fue7qs+72wUhn0KuclFMLPE/txo8BoUkXU0ODxrilxdbXq WK0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jDHCH5FQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id c12si2733440edv.443.2020.05.07.02.20.39; Thu, 07 May 2020 02:21:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jDHCH5FQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726382AbgEGJRS (ORCPT + 99 others); Thu, 7 May 2020 05:17:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725900AbgEGJRS (ORCPT ); Thu, 7 May 2020 05:17:18 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC2C4C061A10; Thu, 7 May 2020 02:17:17 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id mq3so2388153pjb.1; Thu, 07 May 2020 02:17:17 -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=NsGXZKVjnwITEukQUNn3zovirkspDit08UiRlVwi+Ws=; b=jDHCH5FQQr0KoofiUFOeWYHKKJAeXwT3pQX8hLU0Lszpou/L3/+IBV/zzSSMQD+dhD 4Apc7r1egT7m7ecFPi5MIW5sqmdHr22BdFiXc8aj+SN7/jzjVOPPQLA+Txf+vH3ZJ4fB OtMb1jteey3yweQFrutrlOEWvGdXFzFBUSaGN8PKvHzM72xRgMv1Rfv6hSyBwBG0FZ9Y ERKWrNB3ouNH59JfVF0yW6FzBW+kzGG9mtCyRllg36CvFf41mdvy3lSjobtNnIT1X2CE pgdX+Qprf/1X5wuI+vnzx1kCyU72XSZ7szpUogc9NUyepgJPPDNUvQtc89KmqkTB36r3 sLkA== 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=NsGXZKVjnwITEukQUNn3zovirkspDit08UiRlVwi+Ws=; b=JRMxFaabNCSMlZCDCt+h74YulXi/NNCnA4GOkRuMOdnpcx1cu0zjWezwGvCKbVowdN JcP2eT2Cs1y9eDrK+2qPbQFk+RdnOS+eN3696Scua4bNU3oDeCe4g+B5RuZRuMECFD3c 6kB9QNtkHys0QF4eWEQpvU+q+sUu6kbguXWXB5U89B8yTNOb3EzQCizeDP0b1CPCEIoY 3Alg7gy/Jj2tfjxCNKU0DDIZNLKusW+aJeotQNmlg2VOb8UPz0uMk8MgPOpr2/4iiuCQ 5byt9HHMJNU1C0qiN/zkceewSWrvRNn2erpMO0zL75rcKjiCIaEjy5Ubdv3xki9eALRI Tvjg== X-Gm-Message-State: AGi0PuY8m6HMhh4kU17Fz9feImqqN0U/i2JALbqt4T6Vui+H0fHb5Fid fdUcxL5AbN124eqyHiDwbYVVzsNaqyNEBBLTAQY= X-Received: by 2002:a17:90a:fa81:: with SMTP id cu1mr14735775pjb.25.1588843037478; Thu, 07 May 2020 02:17:17 -0700 (PDT) MIME-Version: 1.0 References: <20200505174423.199985-1-ndesaulniers@google.com> <60b16c05ca9e4954a7e4fcdd3075e23d@AcuMS.aculab.com> In-Reply-To: <60b16c05ca9e4954a7e4fcdd3075e23d@AcuMS.aculab.com> From: Andy Shevchenko Date: Thu, 7 May 2020 12:17:05 +0300 Message-ID: Subject: Re: [PATCH] x86: bitops: fix build regression To: David Laight Cc: Brian Gerst , Nick Desaulniers , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Sedat Dilek , stable , Jesse Brandeburg , "kernelci . org bot" , Andy Shevchenko , Ilie Halip , "the arch/x86 maintainers" , "H. Peter Anvin" , Marco Elver , "Paul E. McKenney" , "Peter Zijlstra (Intel)" , Daniel Axtens , Masahiro Yamada , Luc Van Oostenryck , Linux Kernel Mailing List , "clang-built-linux@googlegroups.com" 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 Thu, May 7, 2020 at 10:50 AM David Laight wrote: > From: Brian Gerst > > Sent: 07 May 2020 07:18 > > I think a better fix would be to make CONST_MASK() return a u8 value > > rather than have to cast on every use. > > Or assign to a local variable - then it doesn't matter how > the value is actually calculated. So: > u8 mask = CONST_MASK(nr); Another case with negation won't work like this I believe. So, I thin kthe patch we have is good enough, no need to seek for an evil. -- With Best Regards, Andy Shevchenko