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.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,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 32ACBC433E0 for ; Mon, 22 Jun 2020 06:28:56 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 078282491E for ; Mon, 22 Jun 2020 06:28:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 078282491E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kaod.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jnFwt-0004oq-Af for qemu-devel@archiver.kernel.org; Mon, 22 Jun 2020 02:28:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jnFvw-0003Xq-4p for qemu-devel@nongnu.org; Mon, 22 Jun 2020 02:27:56 -0400 Received: from 1.mo173.mail-out.ovh.net ([178.33.111.180]:54530) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jnFvu-0006vH-6r for qemu-devel@nongnu.org; Mon, 22 Jun 2020 02:27:55 -0400 Received: from player696.ha.ovh.net (unknown [10.108.42.174]) by mo173.mail-out.ovh.net (Postfix) with ESMTP id 91481144DB2 for ; Mon, 22 Jun 2020 08:27:51 +0200 (CEST) Received: from kaod.org (lfbn-tou-1-921-245.w86-210.abo.wanadoo.fr [86.210.152.245]) (Authenticated sender: clg@kaod.org) by player696.ha.ovh.net (Postfix) with ESMTPSA id 7DE9913A2E259; Mon, 22 Jun 2020 06:27:43 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-97G002ab1d371d-71c8-47d3-a75f-67aaef477a88,D5B34DF2F1998B4AFDB97B5973F1BB92C24DD330) smtp.auth=clg@kaod.org Subject: Re: [PATCH v4 2/8] hw/misc/pca9552: Replace magic value by PCA9552_PIN_COUNT definition To: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , qemu-devel@nongnu.org References: <20200620225854.31160-1-f4bug@amsat.org> <20200620225854.31160-3-f4bug@amsat.org> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: <75a63e42-a889-aaab-7898-1af484e05a2f@kaod.org> Date: Mon, 22 Jun 2020 08:27:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200620225854.31160-3-f4bug@amsat.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 5721541851663272875 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedrudekuddguddttdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeevrogurhhitggpnfgvpgfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepfeffvddtudegieefudeugffhjefgieegieegleettdehgfeiieevueeihfegfefgnecukfhppedtrddtrddtrddtpdekiedrvddutddrudehvddrvdegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehplhgrhigvrheileeirdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtohepqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrgh Received-SPF: pass client-ip=178.33.111.180; envelope-from=clg@kaod.org; helo=1.mo173.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/22 02:27:51 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jeffery , Corey Minyard , qemu-arm@nongnu.org, Joel Stanley , Peter Maydell Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 6/21/20 12:58 AM, Philippe Mathieu-Daudé wrote: > Replace the '16' magic value by the PCA9552_PIN_COUNT definition. Reviewed-by: Cédric Le Goater > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/misc/pca9552.h | 1 + > hw/misc/pca9552.c | 2 +- > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/hw/misc/pca9552.h b/include/hw/misc/pca9552.h > index ebb43c63fe..ef6da4988f 100644 > --- a/include/hw/misc/pca9552.h > +++ b/include/hw/misc/pca9552.h > @@ -15,6 +15,7 @@ > #define PCA9552(obj) OBJECT_CHECK(PCA9552State, (obj), TYPE_PCA9552) > > #define PCA9552_NR_REGS 10 > +#define PCA9552_PIN_COUNT 16 > > typedef struct PCA9552State { > /*< private >*/ > diff --git a/hw/misc/pca9552.c b/hw/misc/pca9552.c > index cac729e35a..cfefb8fce8 100644 > --- a/hw/misc/pca9552.c > +++ b/hw/misc/pca9552.c > @@ -291,7 +291,7 @@ static void pca9552_initfn(Object *obj) > * PCA955X device > */ > s->max_reg = PCA9552_LS3; > - s->nr_leds = 16; > + s->nr_leds = PCA9552_PIN_COUNT; > > for (led = 0; led < s->nr_leds; led++) { > char *name; >