From patchwork Fri Nov 20 17:46:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Syed Nayyar Waris X-Patchwork-Id: 11921449 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=-12.2 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 BEB42C2D0E4 for ; Fri, 20 Nov 2020 17:47:35 +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 3C70D2222F for ; Fri, 20 Nov 2020 17:47:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Rd4vzUHS"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QrKRFlMz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C70D2222F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mpBABIvc4xKk1SKuF+BNxsCf9lcAK7Fe0qz8OQ9xrjA=; b=Rd4vzUHSNNATbIBLZsOjz4zj9 tar7fWk4lz/cU0tlBh0Z0PF86Wh+eg6BXcy3nzR4KRdMXdldJ1h0mK9IzVPnptG7yCpOR47rBT3YX uVHF+c5qH/EItzD5NnZGT3AuMpuQTiIf87T2JUIKycuUFO8M1dGxKkqwKy38OXSJqSvJWlS3OSpLp xMmEjmBBYctkn6PVADRj3g36OHD1FATzKPrE6sYpWlEhwUMW1wgc4qHg4prnRWvIJsiJdkECTIiQf UyEFyXm+bg0ZqdDrg61gxqBvOkLEDQGKt+Jrdw4F0Bp55B2MnplP9z/eAwHCsuNTinY0g6G4/VVjj FzrukXP+A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kgAV2-0003eY-BS; Fri, 20 Nov 2020 17:47:08 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kgAUy-0003cB-C5 for linux-arm-kernel@lists.infradead.org; Fri, 20 Nov 2020 17:47:05 +0000 Received: by mail-pl1-x641.google.com with SMTP id u2so5210348pls.10 for ; Fri, 20 Nov 2020 09:47:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uRfbcvxICboodQKlXinezNDbNPHvNn9T8ybYNIuKq0c=; b=QrKRFlMzxWnE/Ue3q/KmittrUjJjuEF4OPURcyVq7nhRqz0JfxrgqLN6zQh+gHym+9 k7rrN2qLtBi6jxTox7VWExWFFitaOV5Y2ltFx8CjyIxu0YM2sAppHoBXBRdvgYqs/lQE qBrhzi7kgGGr+Wreg+KjKM4RPlXsB6E16qVc4mHT5i4Comk6cSRNNVdYPW76IrAmfBSe 7SV9AVwG9+EcrA5nG81N1NlgMdNmZLicVZlhr7PsN733TGKOfjalgOWGO9HIfT64VKcC tn7LGnands5CUXs0q78EzAtbpVkHB1EVSxeyg5tkbBvDRXPha4zokV3Ml95H5qCUfNZE iRvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uRfbcvxICboodQKlXinezNDbNPHvNn9T8ybYNIuKq0c=; b=RL4U3bHHKptG91O5AR92A78M7Y3Jo/e4E5r9mSC7lXClLZiaC7IgWdcNAZA95CtBke 9e4IUrRO5f+qlI/wz6QKMCmyhYAgpZvEdLKgGlYbppp/N7XyO1Pti6Ia5AU28BJAOwCj 7212FPy/mTE9KNqUsHF4PIH53LM0DZzRcumaLx3rM/A0cjOkfjReRmMGUpL1y2L3MpW6 GB8padC1ZoOsRJ8wmUwFkHzrlRboMZ1iTDU2eIKTBYlgizWmG9B/Izv34ypXsOVJ1Q1u Lv3eGz1OumVbHHkcDrr0eU+D7ZzFzr6C7RsdlvwsbvHB+6ymnBWPG3DTIJlP2uEhbJg/ gNDA== X-Gm-Message-State: AOAM530IxAKajtKNOerDo/GylkFJW7pnbQz0gYO/ZQSrayVzWQtMGlUA dueZGAj/wGyYbFCvpOMzWic= X-Google-Smtp-Source: ABdhPJwxzFrhgYSWjQYVZb3/YDn5TAj02ZE2o3DR/INcrJCXODyEyqj+UWac7dctbvBTSIVUSUmVvQ== X-Received: by 2002:a17:902:868e:b029:d7:eb0d:79e8 with SMTP id g14-20020a170902868eb02900d7eb0d79e8mr14536568plo.12.1605894422031; Fri, 20 Nov 2020 09:47:02 -0800 (PST) Received: from syed ([2401:4900:2e82:cfda:fc82:287b:3e19:db98]) by smtp.gmail.com with ESMTPSA id k8sm4394747pfh.6.2020.11.20.09.46.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Nov 2020 09:47:01 -0800 (PST) Date: Fri, 20 Nov 2020 23:16:46 +0530 From: Syed Nayyar Waris To: akpm@linux-foundation.org Subject: [PATCH 3/4] gpio: xilinx: Modify bitmap_set_value() calls Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201120_124704_570015_11880CD7 X-CRM114-Status: GOOD ( 13.14 ) 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: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, vilhelm.gray@gmail.com, michal.simek@xilinx.com, bgolaszewski@baylibre.com, andriy.shevchenko@linux.intel.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Modify the bitmap_set_value() calls. bitmap_set_value() now takes an extra bitmap width as second argument and the width of value is now present as the fourth argument. Cc: Michal Simek Signed-off-by: Syed Nayyar Waris --- drivers/gpio/gpio-xilinx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c index ad4ee4145db4..05dae086c4d0 100644 --- a/drivers/gpio/gpio-xilinx.c +++ b/drivers/gpio/gpio-xilinx.c @@ -151,16 +151,16 @@ static void xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask, spin_lock_irqsave(&chip->gpio_lock[0], flags); spin_lock(&chip->gpio_lock[1]); - bitmap_set_value(old, state[0], 0, width[0]); - bitmap_set_value(old, state[1], width[0], width[1]); + bitmap_set_value(old, 64, state[0], width[0], 0); + bitmap_set_value(old, 64, state[1], width[1], width[0]); bitmap_replace(new, old, bits, mask, gc->ngpio); - bitmap_set_value(old, state[0], 0, 32); - bitmap_set_value(old, state[1], 32, 32); + bitmap_set_value(old, 64, state[0], 32, 0); + bitmap_set_value(old, 64, state[1], 32, 32); state[0] = bitmap_get_value(new, 0, width[0]); state[1] = bitmap_get_value(new, width[0], width[1]); - bitmap_set_value(new, state[0], 0, 32); - bitmap_set_value(new, state[1], 32, 32); + bitmap_set_value(new, 64, state[0], 32, 0); + bitmap_set_value(new, 64, state[1], 32, 32); bitmap_xor(changed, old, new, 64); if (((u32 *)changed)[0])