Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1169708pxb; Thu, 24 Mar 2022 14:15:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9qi0T1B+6IB2pr+nTuMZYEGcXgPSww7NVcwMgqq+wjaIiISwuS8FhpKb6gRkbA+A31drr X-Received: by 2002:a05:6402:1d4a:b0:419:7c50:dcbf with SMTP id dz10-20020a0564021d4a00b004197c50dcbfmr8924073edb.340.1648156514515; Thu, 24 Mar 2022 14:15:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648156514; cv=none; d=google.com; s=arc-20160816; b=OqU/kJ8uewhUEWUWLqVRBV7L07T+72cViPfuarWxSs+uF/RWSaxx1yoORgFqR/oFWe sa4n+agHX0oG211pI2MsGu90/LTCAt7XolF1Tm5NemPK9+zYrGKemZYCttGvEZroE0EC S6936xzogN4B+3ouKn17DXGa7EKigHyA4zurUdgKxumOvaOd2kHViazUUQadISFCl+L0 nZ3WJoAyEVzO/Ioreo/lohmvmmIKHTsiUtTpNOMTPNSXxIARJ6PnnPYzZrr/gTohsBmG zEKTn4RJvCNq1ShFLUDePgUcKhPlfWDfdoyM05Tzl/cwJHE2mZPL5W1cEM2xrdnXJTIj 22wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=RTM8YUH/16l7EmtQcBgSO7BwZNaXuM1GsNHw5TU8YMA=; b=G9dr47qXiX0geEATm96gotNg3ZJF/bDGH8IlcDBc+1SLIzkp3KmvkVOGSSkJFwXdSW eWohSaNrA15Kq+CvPapS0yv+F4aE2scdGatuCROEy9+LkaYqCqGEX83jRY2P0+LT9N20 7KNBOdLY7X5+5Yy+7GLMrBGOnwiA57rSnng8ka5uGRbQawI4kFgW923qya75g4oHUbwe ytbbuAsGCqPGq3DsrLtWa61NemmdH8+BMjujMMtPoZyH7aZ4h7oX0UkPVI7p8w7lxdHQ uj7EOlLa/omiM6gxfdSwufVWyEJlCG5vfSlS6slmSQIU11RYFtKIIVgAVlxPmZ5vMRHx Ug5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=J29nEJua; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k1-20020a170906970100b006df79ec22fdsi506045ejx.567.2022.03.24.14.14.49; Thu, 24 Mar 2022 14:15:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=J29nEJua; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239487AbiCVRUQ (ORCPT + 99 others); Tue, 22 Mar 2022 13:20:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235774AbiCVRUQ (ORCPT ); Tue, 22 Mar 2022 13:20:16 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0260A27160; Tue, 22 Mar 2022 10:18:48 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id g24so23675302lja.7; Tue, 22 Mar 2022 10:18:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=RTM8YUH/16l7EmtQcBgSO7BwZNaXuM1GsNHw5TU8YMA=; b=J29nEJuaabNwiyFtO8XZPJKmEU9lbA8VGTBj0axXaQD+gTYL1YKfUAADfwV/o/lH8o wRmlmmOVhmigITYeNYkxvKqC1BmEQ8TT7w2jnw6P4bHYJqs30SY0R9jl953jv2p00H/1 0+tmBnmJOmrY4v4vb2xjA5lMl3pjnCv9DYZFQ/BI5ZAlwbJNuvnxbEXjWL53tNCMaPL2 BbK893Os0K1j3Bj1/igfs65CzEV8BGVA6Y7JTd0qE6plW2BdV4BeNSTmnnnKCqlRLYKl 9+vdcIStLRNz04/cWIrq+DhMCXoKhlyb+sDtos9t1bZLSBhWPbktKKFGfO2OtkSYNoqg iv/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=RTM8YUH/16l7EmtQcBgSO7BwZNaXuM1GsNHw5TU8YMA=; b=ppnQJCTIOlltrlvDx19PrrTduZ9pZItzekh0Mz0kjtNj83SoZpaRW+wKKK5HwygAsw z6LfvIod85s+IiXUmciMS5JcFhVtKq+kUbeWiCW92fzXQorU0vdrxqPxlLAw335bnJwL ur99cPglGP3+tkZu93mbB9wgKRUTThhNbDzWioP6zbwwdv6hUrgjUl9FEYuO2FnsTvmK BzpIh9PePMj3wjYYA0maI4ooQ53hBf2lHpz8mZ+iVckssSXjVKKi0nUA12lJdas0VlNC tWiiEP4pvaz0Pt/iGQbqStXy7Dry7JyShI92b54Y4IWohnLRCp/1b7O5yeSYhxIR2rDH swfw== X-Gm-Message-State: AOAM5318R8RT0Z5p9F/1NMHt/80/9YSBAhSztWPEeRT4RLwPxqFRBZBx bJ6lN2Eu0mhtiUndZL2Bo67Jrp6+JRe1704alQ== X-Received: by 2002:a2e:505b:0:b0:248:1fc:68e9 with SMTP id v27-20020a2e505b000000b0024801fc68e9mr20172432ljd.206.1647969525404; Tue, 22 Mar 2022 10:18:45 -0700 (PDT) MIME-Version: 1.0 References: <20220303083141.8742-1-warp5tw@gmail.com> <20220303083141.8742-9-warp5tw@gmail.com> In-Reply-To: From: Avi Fishman Date: Tue, 22 Mar 2022 19:18:34 +0200 Message-ID: Subject: Re: [PATCH v3 08/11] i2c: npcm: Correct register access width To: =?UTF-8?Q?Jonathan_Neusch=C3=A4fer?= Cc: Andy Shevchenko , Tali Perry , Tomer Maimon , devicetree , yangyicong@hisilicon.com, Linux I2C , Benjamin Fair , Krzysztof Kozlowski , OpenBMC Maillist , JJLIU0@nuvoton.com, Lukas Bulwahn , Tomer Maimon , KWLIU@nuvoton.com, bence98@sch.bme.hu, Arnd Bergmann , sven@svenpeter.dev, Rob Herring , Avi Fishman , Tyrone Ting , semen.protsenko@linaro.org, jie.deng@intel.com, Patrick Venture , Linux Kernel Mailing List , Wolfram Sang , kfting@nuvoton.com, Tali Perry , olof@lixom.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 4, 2022 at 10:42 PM Jonathan Neusch=C3=A4fer wrote: > > Hello, > > On Thu, Mar 03, 2022 at 04:15:18PM +0200, Andy Shevchenko wrote: > > On Thu, Mar 03, 2022 at 02:54:27PM +0200, Tali Perry wrote: > > > > On Thu, Mar 03, 2022 at 04:31:38PM +0800, Tyrone Ting wrote: > > > > > From: Tyrone Ting > > > > > > > > > > Use ioread8 instead of ioread32 to access the SMBnCTL3 register s= ince > > > > > the register is only 8-bit wide. > > > > > > > > > Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controll= er driver") > > > > > > > > No, this is bad commit message, since you have bitwise masks and th= ere is > > > > nothing to fix from functional point of view. So, why is this a fix= ? > > > > > > > > > > The next gen of this device is a 64 bit cpu. > > > The module is and was 8 bit. > > > > > > The ioread32 that seemed to work smoothly on a 32 bit machine > > > was causing a panic on a 64 bit machine. > > > since the module is 8 bit we changed to ioread8. > > > This is working both for the 32 and 64 CPUs with no issue. > > > > Then the commit message is completely wrong here. > > I disagree: The commit message is perhaps incomplete, but not wrong. > The SMBnCTL3 register was specified as 8 bits wide in the datasheets of > multiple chip generations, as far as I can tell, but the driver wrongly > made a 32-bit access, which just happened not to blow up. > > So, indeed, "since the register is only 8-bit wide" seems to be a > correct claim. > > > And provide necessary (no need to have noisy commit messages) > > bits of the oops to show what's going on > > I guess it's blowing up now because SMBnCTL3 isn't 32-bit aligned > (being at offset 0x0e in the controller). > Hi Andy, After this clarification can you please acknowledge this specific patch? If you think there is a better way to describe this, can you propose one? > > Jonathan --=20 Regards, Avi