Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966686AbcCPMDQ (ORCPT ); Wed, 16 Mar 2016 08:03:16 -0400 Received: from mail-ob0-f176.google.com ([209.85.214.176]:36737 "EHLO mail-ob0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965787AbcCPMDM (ORCPT ); Wed, 16 Mar 2016 08:03:12 -0400 MIME-Version: 1.0 In-Reply-To: <1457713887-7748-1-git-send-email-geert+renesas@glider.be> References: <1457713887-7748-1-git-send-email-geert+renesas@glider.be> Date: Wed, 16 Mar 2016 13:03:10 +0100 Message-ID: Subject: Re: [PATCH] gpio: pca953x: Fix pca953x_gpio_set_multiple() on 64-bit From: Linus Walleij To: Geert Uytterhoeven Cc: Alexandre Courbot , Phil Reid , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 532 Lines: 15 On Fri, Mar 11, 2016 at 5:31 PM, Geert Uytterhoeven wrote: > pca953x_gpio_set_multiple() divides by 4 to convert from longs to bytes, > which assumes a 32-bit platform, and is not correct on 64-bit platforms. > Use "sizeof(...)" instead to fix this. > > Fixes: b4818afeacbd8182 ("gpio: pca953x: Add set_multiple to allow multiple bits to be set in one write.") > Signed-off-by: Geert Uytterhoeven Patch applied for fixes. Tagged for stable. Ack from Phil. Yours, Linus Walleij