Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32ECCC4332F for ; Tue, 21 Dec 2021 16:26:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239796AbhLUQ0v (ORCPT ); Tue, 21 Dec 2021 11:26:51 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:32541 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239749AbhLUQ0s (ORCPT ); Tue, 21 Dec 2021 11:26:48 -0500 X-IronPort-AV: E=Sophos;i="5.88,224,1635174000"; d="scan'208";a="104724102" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 Dec 2021 01:26:47 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id A413B40A64B7; Wed, 22 Dec 2021 01:26:45 +0900 (JST) From: Lad Prabhakar To: Rob Herring , Damien Le Moal , Sergey Shtylyov , linux-ide@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Prabhakar , Lad Prabhakar Subject: [PATCH v2 4/4] ata: pata_platform: Make use of GENMASK() macro Date: Tue, 21 Dec 2021 16:26:14 +0000 Message-Id: <20211221162614.25308-5-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211221162614.25308-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20211221162614.25308-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make use of GENMASK() macro instead of open coding. Signed-off-by: Lad Prabhakar --- v1-->v2 * New patch --- drivers/ata/pata_platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c index 80e5cb12707e..118b332dae2d 100644 --- a/drivers/ata/pata_platform.c +++ b/drivers/ata/pata_platform.c @@ -244,8 +244,7 @@ static int pata_of_platform_get_pdata(struct platform_device *ofdev, priv->use16bit = of_property_read_bool(dn, "ata-generic,use16bit"); - priv->pio_mask = 1 << pio_mode; - priv->pio_mask |= (1 << pio_mode) - 1; + priv->pio_mask = GENMASK(pio_mode, 0); return 0; } -- 2.17.1