From mboxrd@z Thu Jan 1 00:00:00 1970 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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 8673BC43460 for ; Sat, 10 Apr 2021 00:07:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4BA126102A for ; Sat, 10 Apr 2021 00:07:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235233AbhDJAHz (ORCPT ); Fri, 9 Apr 2021 20:07:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235225AbhDJAHx (ORCPT ); Fri, 9 Apr 2021 20:07:53 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83A73C061762 for ; Fri, 9 Apr 2021 17:07:38 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id r20so8404501ljk.4 for ; Fri, 09 Apr 2021 17:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wJNZvvQN4sPxM5wTrNOHML+RfF3Y8nDwxuD/Ny2pkH0=; b=XzsZoxckL2/lWNBV343T7e8p1OP1MEHfrrQySw3QeHFDCqhKSGv5/ETPu7lgi9+czL GCzTdNeJ/sv/szktTSmrR+2owxPBidWWcD6smgH2GCf10wu+l/4m1VF19xWl+Ip+jKLD K3ASd9yBJP8nC/sqUXiJNPb9ltqdqFHATegBbiYog/mmJV/XgUf9NGrOm2OOBr3Q7FUe 1VGb0vo1Cwu5lWjTA+c7G8wgKFe9dw1cSOeyD/vvZL52W5BuLlgkL3qx0LRPCc5TVS1V KJN/jbBMZ0u+ZiWmtlTs23MUBSHUYzcx61NGUwKFwZ0xrqON6F5TzDVxbVgCW5wzQL0l TyDA== 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=wJNZvvQN4sPxM5wTrNOHML+RfF3Y8nDwxuD/Ny2pkH0=; b=qxptiDDczjTjbFW49LuQ5FA8n0RJjM4A0KrwhNe4Ix1D4qxihvdR1COzHdkguaBKTO 1ot2dqF8JKJbD3PUWiDHrI10jrcUQwPx5NciRB7GSdOAA2reEurIwMkjwj80x0lsvwtX Z5Ghklvfn8I5suvOSWG74CH/icbyxLAbyCsWA/YMNwqiHn20C5jKk3kx2+3luYKOJcEP pUCeTBCtPSysVK0pETxmLOgrTQpbbnjjRrAiLwXJFkLxdN9SMN6zPL8AfvYlN20acNrW nDSXVLYuefOTs5BffHosOf1GBFSK0q+MLbO5jFQzrZ1s/DlIFW8vKDmA6yLJ8FoemTQD V+LA== X-Gm-Message-State: AOAM532rAY/OcS4cSCJu2qp8oy+/3lQfpfNQ9Ej+fxQbxDKOYULUytZa HXhKGE4DLN7u2pxEhM/NCI46Gy5i1yTpayXZaWr+1B4CNK4EfA== X-Google-Smtp-Source: ABdhPJyi9BNKN/wSUa0cnqzp5rwoSw8W2ep8I9VXh2Adb4f1hRty42wJTvzb17wXiXq9jMTCp9/8ZZiGbZUTThq0SQQ= X-Received: by 2002:a2e:7001:: with SMTP id l1mr10693204ljc.200.1618013256948; Fri, 09 Apr 2021 17:07:36 -0700 (PDT) MIME-Version: 1.0 References: <20210408195029.69974-1-krzysztof.kozlowski@canonical.com> In-Reply-To: <20210408195029.69974-1-krzysztof.kozlowski@canonical.com> From: Linus Walleij Date: Sat, 10 Apr 2021 02:07:26 +0200 Message-ID: Subject: Re: [PATCH] pinctrl: samsung: use 'int' for register masks in Exynos To: Krzysztof Kozlowski Cc: Tomasz Figa , Sylwester Nawrocki , Linux ARM , linux-samsung-soc , "open list:GPIO SUBSYSTEM" , linux-kernel , Marek Szyprowski , Bartlomiej Zolnierkiewicz Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Thu, Apr 8, 2021 at 9:50 PM Krzysztof Kozlowski wrote: > The Special Function Registers on all Exynos SoC, including ARM64, are > 32-bit wide, so entire driver uses matching functions like readl() or > writel(). On 64-bit ARM using unsigned long for register masks: > 1. makes little sense as immediately after bitwise operation it will be > cast to 32-bit value when calling writel(), > 2. is actually error-prone because it might promote other operands to > 64-bit. > > Addresses-Coverity: Unintentional integer overflow > Signed-off-by: Krzysztof Kozlowski (...) > Please apply it directly, I don't have any patches for Samsung pinctrl > in my tree. OK! Patch applied! Yours, Linus Walleij From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 6C9EAC433ED for ; Sat, 10 Apr 2021 00:10:28 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 042B46008E for ; Sat, 10 Apr 2021 00:10:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 042B46008E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6tZ+Z3NO8KuxpSdlqBAZItXl6cCQiq/rCMN2gVXVCp8=; b=SYqhwqtVUoQHb/pvzNOxF0Nzc iDBit/8M837WY0O6wweXtRQDOdhXFepIAH6Ir5nBZW8qKlVDvlA2gHSw1mQtEXWiwny2OJ12sJWVF nHHfY5o4qEcgbTov1kdeeFnyBRN53dqAHGJnKZYGbryWJKFK5WscT1WC7kR0jw1EU7tYlQfCj4YNv fBCTdwUfV+ke6MhXK3yibJXbMcdq68gQ5xudJaW4bYGHlAdFBqeDiquGBAqhHD9jzFVzE38rDrnZu 3Q91tRk8A2A4C0FTWVAeBZ6kXLk4fNVOq54NDihwU/5uL9sEku3SJ2Ya/GFQACGYL/mklxDu2qZOy yyhQu7hFQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lV1Aa-001nq8-Ll; Sat, 10 Apr 2021 00:08:13 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lV1A6-001nox-BV for linux-arm-kernel@desiato.infradead.org; Sat, 10 Apr 2021 00:07:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wJNZvvQN4sPxM5wTrNOHML+RfF3Y8nDwxuD/Ny2pkH0=; b=3niMY7/gd4pvcHGrAHlLScyx4p He8wNCZmpgwFmKl1m6NYWWVnP5VMUPunyRpUo9IJ9gOpgf2TYCsYdhDwTI7GMsK3yyP8DMKNYljD6 nykSfUCDBEqUYcO2JgEsknMxMpTyo5Bc3AVmI+aSAY8Db6iybdZyUAf/ZdThLJru1YdK8kLDaXT4L 1GVSC7SUCBynMepZ8dESa1N6Rn9L99sPaFndVilDqjQtfblB5MW4oI89VeZhc/dc20MEKNslKvDip kysVMDWIfdA0/7Z2PJ6bGwTC6CehkyADPTOW0NBx1cy2T60hiGGxW8hQJafUjmNk9hiLa2AnJkrzb gU/c1Ilg==; Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lV1A3-004ruT-HZ for linux-arm-kernel@lists.infradead.org; Sat, 10 Apr 2021 00:07:40 +0000 Received: by mail-lj1-x234.google.com with SMTP id u9so8383457ljd.11 for ; Fri, 09 Apr 2021 17:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wJNZvvQN4sPxM5wTrNOHML+RfF3Y8nDwxuD/Ny2pkH0=; b=XzsZoxckL2/lWNBV343T7e8p1OP1MEHfrrQySw3QeHFDCqhKSGv5/ETPu7lgi9+czL GCzTdNeJ/sv/szktTSmrR+2owxPBidWWcD6smgH2GCf10wu+l/4m1VF19xWl+Ip+jKLD K3ASd9yBJP8nC/sqUXiJNPb9ltqdqFHATegBbiYog/mmJV/XgUf9NGrOm2OOBr3Q7FUe 1VGb0vo1Cwu5lWjTA+c7G8wgKFe9dw1cSOeyD/vvZL52W5BuLlgkL3qx0LRPCc5TVS1V KJN/jbBMZ0u+ZiWmtlTs23MUBSHUYzcx61NGUwKFwZ0xrqON6F5TzDVxbVgCW5wzQL0l TyDA== 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=wJNZvvQN4sPxM5wTrNOHML+RfF3Y8nDwxuD/Ny2pkH0=; b=pKIHC54ofJT4Wu5Z4yaUvK6Kv5Vx2ZxU/fknTaKocKerYcgdzjiTgExkg4y5yCE8Dp Srbi3cmhGDrj9wswu175MoVISeNZ0ORM9hvSpkEMZ1jUNTNy5qLFVv1+H7wbNNhmJrwq PNzUHC87bQ7mClMLYLGFXy45tSUrz8u62Gw8bwW2h/LDVorC64T9tOwrYpyJpksW+6fv xIxMH+bLEpkLLL4v7WGrzSv5kZyxGOCZkQeulYaqo+5xlYztQ3PYjwEcvy9sEJtY/iwr zVI81ZqZH/oHnVwEF0/fkv6KOq6p1F0vlJ6WBxUCEKfNdl+oNFWXkhxEtnOoHvzEfxuT 0ZJA== X-Gm-Message-State: AOAM533g+VQ8f4jwYk5Rny8SpRfNWBt0slznhds5eZxpSnRVuK3gsodM tF0QliEe1HclmRqAl0SJH8JQmycHWWZPam+8V0Ilag== X-Google-Smtp-Source: ABdhPJyi9BNKN/wSUa0cnqzp5rwoSw8W2ep8I9VXh2Adb4f1hRty42wJTvzb17wXiXq9jMTCp9/8ZZiGbZUTThq0SQQ= X-Received: by 2002:a2e:7001:: with SMTP id l1mr10693204ljc.200.1618013256948; Fri, 09 Apr 2021 17:07:36 -0700 (PDT) MIME-Version: 1.0 References: <20210408195029.69974-1-krzysztof.kozlowski@canonical.com> In-Reply-To: <20210408195029.69974-1-krzysztof.kozlowski@canonical.com> From: Linus Walleij Date: Sat, 10 Apr 2021 02:07:26 +0200 Message-ID: Subject: Re: [PATCH] pinctrl: samsung: use 'int' for register masks in Exynos To: Krzysztof Kozlowski Cc: Tomasz Figa , Sylwester Nawrocki , Linux ARM , linux-samsung-soc , "open list:GPIO SUBSYSTEM" , linux-kernel , Marek Szyprowski , Bartlomiej Zolnierkiewicz X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210409_170739_606492_6C82DEEA X-CRM114-Status: GOOD ( 11.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 8, 2021 at 9:50 PM Krzysztof Kozlowski wrote: > The Special Function Registers on all Exynos SoC, including ARM64, are > 32-bit wide, so entire driver uses matching functions like readl() or > writel(). On 64-bit ARM using unsigned long for register masks: > 1. makes little sense as immediately after bitwise operation it will be > cast to 32-bit value when calling writel(), > 2. is actually error-prone because it might promote other operands to > 64-bit. > > Addresses-Coverity: Unintentional integer overflow > Signed-off-by: Krzysztof Kozlowski (...) > Please apply it directly, I don't have any patches for Samsung pinctrl > in my tree. OK! Patch applied! Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel