From patchwork Fri Jan 22 12:21:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12039265 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C90DC433E0 for ; Fri, 22 Jan 2021 12:23:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E307235F7 for ; Fri, 22 Jan 2021 12:23:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E307235F7 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Sm71AX0a2Ztbw2+Ui/JPdoh7/8WflDU3qx7DZIt4RSU=; b=w0nOEtp5Ork1525+BOWgb4gsv BFptyADZVvxMt1dtXZ2G9rmQ8nRZCdFoDr5AkEuy2KRUCdAnTPD5BUacdqIHmvWnKDR29UhsItoc8 jhN/aq3nDi8gMWt3dbWhS5GHpCklyI7BJRG0n4Yty/2wzeiyQPV511ojulkETXYigb6H7jdVIB4GV wjF8BctAsXTWW9uZix6IonNcyJnlmoYWK0PlizUBuHBf7+i24wnkIBE1PC/6oc0hvML0sIdIgZtgg t7UEPWdtIqMNAMxYeMDbPmKPIsxm0ZN9Syr04a5nJ351nevqYcUar3OmVdCufXgRzbXy8rPUcMkOE D7qVlMhqw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2vRz-0001wk-Ej; Fri, 22 Jan 2021 12:22:03 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2vRq-0001uk-Lr for linux-arm-kernel@lists.infradead.org; Fri, 22 Jan 2021 12:21:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1611318114; x=1642854114; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=vw00xgEn68i9C4mmR34lRmSRWa9lb5jp8d2mih7WHzw=; b=Lt51DDx5nAr0Jyrwam4TfKCqAT3eWo/X3chNRVtHeRa/oPG8zS4CuuDa 0aioO3lPcCAHTrDHmfuu8DGy4R5H22xh5fK1zdVq1F1PmOsSzWShQhaGL mkjBqnPp9kXs/ir++rKZ6WdFNNzKPW02C13WV89j2+nbv2exGezkLj/8C Qqvlu0Uv4l8IQSvDvnfV27iR34yj119KV9xPsXMAWR0/N2KvTYCLmpO9O mhnuIYksugl79JPGFNTg55HupJakskRS04oKm54hbVckQZAjWbmubhXDg Ilg1kPkFsu/Jxke6ploenKad/djXttcXsbQ0u9KuC8My8HgNRySdHlr6z g==; IronPort-SDR: xVQWQgeiiCEYOND7mGIgdrf6VCKbtQ6rJZinh3Gj/JMmIzdUNPHfqeU7hcI1y1m0lB5G8U9g0P enNSxh59Zl7Ft/bIl4R8QXPlrCf/mK1R6zcrTd0CeTou1E5MH08TobcPOidMVPdZcs+Umso0M9 gfyOhUdISB59sxBlvcfv3fphaxZ7RmpOTt6A+MfSJfY9cXEqUhTDfMS+8kfB3bU5TdlwjBrjef e6zzbofHWADVWUiojCGXXdPIDsWyiKK2ppO/CAog/pWV4Iund+f7LX5cOQfV5G/K8OAsMugRU9 zOc= X-IronPort-AV: E=Sophos;i="5.79,366,1602572400"; d="scan'208";a="106908940" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 22 Jan 2021 05:21:52 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Fri, 22 Jan 2021 05:21:52 -0700 Received: from m18063-ThinkPad-T460p.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Fri, 22 Jan 2021 05:21:48 -0700 From: Claudiu Beznea To: , , , Subject: [PATCH 2/7] drivers: soc: atmel: use GENMASK Date: Fri, 22 Jan 2021 14:21:32 +0200 Message-ID: <1611318097-8970-3-git-send-email-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611318097-8970-1-git-send-email-claudiu.beznea@microchip.com> References: <1611318097-8970-1-git-send-email-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210122_072154_867263_63EA795C X-CRM114-Status: GOOD ( 10.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use GENMASK() to define CIDR match mask. Signed-off-by: Claudiu Beznea --- drivers/soc/atmel/soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/atmel/soc.c b/drivers/soc/atmel/soc.c index 1a6cb4bc7d67..ef591b622583 100644 --- a/drivers/soc/atmel/soc.c +++ b/drivers/soc/atmel/soc.c @@ -28,7 +28,7 @@ #define AT91_CHIPID_EXID 0x04 #define AT91_CIDR_VERSION(x) ((x) & 0x1f) #define AT91_CIDR_EXT BIT(31) -#define AT91_CIDR_MATCH_MASK 0x7fffffe0 +#define AT91_CIDR_MATCH_MASK GENMASK(30, 5) static const struct at91_soc __initconst socs[] = { #ifdef CONFIG_SOC_AT91RM9200