From patchwork Tue Jul 23 07:49:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 169487 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp8536413ilk; Tue, 23 Jul 2019 00:50:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgY5G2Fcc7p4iwKaV71YE6HU9wtYppBk+xjbxrTJx85L8CGD86JN1s4Y+r5vDN8qEvihCk X-Received: by 2002:a63:d30f:: with SMTP id b15mr74628942pgg.341.1563868220096; Tue, 23 Jul 2019 00:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563868220; cv=none; d=google.com; s=arc-20160816; b=aMLEQ+lpcXfG/1+A0767pONzUeX4y2n7NT1jz7CgvvCIn8V10LqSTPYAgZUuaPE6cV UXuolPHDpXJI116+v3JnSWr5QublOxEVZAnTkfqU6voB4kAxXtjFEbS3FW/L1z3/dm+H niEQ8L6y2cak+fkVMOng7ovxc+RV26cILFbr6btuEguyXHs4PQC2qa2GuNHFc1eS9hN6 oGCeyJNBqB5Pie8GwiXip0dcfd5MAKwDs9N+054Kf2lO3jntnYkzF/CzGWo6KPPN9AYz XNQ2tDn+AZDt7r+tw5FpGob4EhDXwPySIp4cugJrSl2z6ptWNDHEXjeWHVomYbzhktMP vZDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=/ZG3CdOtI33rMeokPxToXGxnzYvk2W+J+Ed/VTmXJgQ=; b=Q5qSyufWcm7ZFu9V/mTFn8BZK+kWJ1FfyjTuKzdTtC6anG6yktbigwVX6QAKmvijG+ VsnVKFwtKnhSugfii2jDUPCA060tKqybjlSPuptQbs+IjSzme3o6FCf74LbTahbVMyAW X/VrNKKrDQxo6zNU9TjAAiiNqe2NzZpR0ymGdY8qtOwVNPrAdYMok9gc8eVqoB5bf8AW A668URRy8rZrJ6asrrHqHeF1iO/n/8KS6WB6tNB3VJZKMBwKtggD1pwVoiLj66zcX0Gs dRgr+7qHUhmGKYEvUnkvDMwwq63rZwPMzXpI/aIFUbEW2EusG1M3eOPNHCVfZBAvfuJq g6Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=FWn4FdN8; 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 q1si9856334pll.324.2019.07.23.00.50.19; Tue, 23 Jul 2019 00:50:20 -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=@nifty.com header.s=dec2015msa header.b=FWn4FdN8; 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 S2388513AbfGWHuS (ORCPT + 29 others); Tue, 23 Jul 2019 03:50:18 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:26611 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727170AbfGWHuS (ORCPT ); Tue, 23 Jul 2019 03:50:18 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id x6N7nlBd002370; Tue, 23 Jul 2019 16:49:47 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x6N7nlBd002370 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1563868187; bh=/ZG3CdOtI33rMeokPxToXGxnzYvk2W+J+Ed/VTmXJgQ=; h=From:To:Cc:Subject:Date:From; b=FWn4FdN8vgdvI+ITeXpzuYYA2oYpl78IRJ4p0xGrmx5Qs/sTQMfkrBwK+g1OjC2Sf HRxEAngWoNxEVkDDIsxSvSZC4g0017ceC3kVfjUmLKrAhsr5s1+OWPFfWoPZt8tGcD T7D+AQL0izjln7ltNs4GOyGKZv0z9aCpUemW6A6a0WjkvWXoW2eyzG5ibb+cTRJasv IQEv7j0VZEQCCfIWSFp41UkXu4PbMsDKgENy/+OM4Ciyta9aGddYVz0fweXDjQg1iZ unvnnhaSqRNLDISOPcKjSpsE/z6kLklewyyvPO/CqLsAbWJv4q1g0IBRxFaUJVQvUP Dl/sjG7prNuAQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH] sh: use __builtin_constant_p() directly instead of IS_IMMEDIATE() Date: Tue, 23 Jul 2019 16:49:43 +0900 Message-Id: <20190723074943.17093-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org __builtin_constant_p(nr) is used everywhere now. It does not make much sense to define IS_IMMEDIATE() as its alias. Signed-off-by: Masahiro Yamada --- arch/sh/include/asm/bitops-op32.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/arch/sh/include/asm/bitops-op32.h b/arch/sh/include/asm/bitops-op32.h index 466880362ad1..cfe5465acce7 100644 --- a/arch/sh/include/asm/bitops-op32.h +++ b/arch/sh/include/asm/bitops-op32.h @@ -16,11 +16,9 @@ #define BYTE_OFFSET(nr) ((nr) % BITS_PER_BYTE) #endif -#define IS_IMMEDIATE(nr) (__builtin_constant_p(nr)) - static inline void __set_bit(int nr, volatile unsigned long *addr) { - if (IS_IMMEDIATE(nr)) { + if (__builtin_constant_p(nr)) { __asm__ __volatile__ ( "bset.b %1, @(%O2,%0) ! __set_bit\n\t" : "+r" (addr) @@ -37,7 +35,7 @@ static inline void __set_bit(int nr, volatile unsigned long *addr) static inline void __clear_bit(int nr, volatile unsigned long *addr) { - if (IS_IMMEDIATE(nr)) { + if (__builtin_constant_p(nr)) { __asm__ __volatile__ ( "bclr.b %1, @(%O2,%0) ! __clear_bit\n\t" : "+r" (addr) @@ -64,7 +62,7 @@ static inline void __clear_bit(int nr, volatile unsigned long *addr) */ static inline void __change_bit(int nr, volatile unsigned long *addr) { - if (IS_IMMEDIATE(nr)) { + if (__builtin_constant_p(nr)) { __asm__ __volatile__ ( "bxor.b %1, @(%O2,%0) ! __change_bit\n\t" : "+r" (addr)