Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp638880lqb; Fri, 15 Mar 2024 02:02:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVg6ee0URD+mrA3OLFZLR6krnclOjJEYzjh2WXtt3r1eldbTa7gVgUvS/Ov+nQv8p50xCFanQ96vYpfExrl7bttD6eCqJ65PnbXwCHkOQ== X-Google-Smtp-Source: AGHT+IEE6WPkrA5XTUlOzbKqjKKpW0PzfcVipdS4kXAlpYz71+SjqYchVFWPN1ulynf6LahLRXPS X-Received: by 2002:a0c:e946:0:b0:690:299:1909 with SMTP id n6-20020a0ce946000000b0069002991909mr3319965qvo.50.1710493363541; Fri, 15 Mar 2024 02:02:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710493363; cv=pass; d=google.com; s=arc-20160816; b=XYCN8aF2ToNXQw1Ihv1we5W4TqxDDm5IjRRBM7oz//vhPmzSEe1xbdpMcjSwH14Eb8 GjP3MJTKv+5rA4jhRrN/EZUPp7T6zDCLnLPIh2NKiqRDrjHlervrhnsiCTx7y2R4nKDX hELDm7698oHUeFTe24n8+xLx34tgrKPylR+lJJpJYoMU8/Dwhp1HOOLzsga2p/fBISHi PJPux5y8RQZ4UQrngmSp7pcACFGfRYCqrRTq1Jtzss7CusKtqN9aHmY7cuXSGELMg1G5 nsconqfi0opYPr2EpU6Zc88vQzF2A48nmgU0zG0Gehe3+48thtBRZa8JsMbBnwP4TwXN WhyQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=8QSAngh93Fh7RS7D0R2QjSELDi+nntpa83PPWvfuPLo=; fh=nccoWi3+T9rC3xCW+OWluqLag7472DHuKZek0TqAVuE=; b=hm8pnnYMu0gdB6A/CzZj8pO1D6Qv0xw9SwNL+txwqB9Xm7mTRmtMrt33zjUUXgIweJ fFwpWKRkpERPid9M3PX6L8oFIk0UbNEedQBFX1OPUwO4gHJrk0h8JSPfNm2nOfZzeFul J63gbjoc1xgxpXOozPn4Ksm13yCkTFydA6yA/IsWbzNboNdZlHAI7BhHzQRCMqzeJgYB 1QopK9+UahgaZ0IeK5Aqx36OlxEdsDc+/LZaEUmCoezyhcKBmcU0J5WII9LK1rrJmmrm 3FGTmQZZra2PiVm2UJHI1/wBuku8rks2BSLz0aoJLwh35D9OobuhWKmzMh68Z5XQX8vD hWqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=luIYzghi; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-104181-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104181-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 8-20020ad45b88000000b006903099b236si2388337qvp.504.2024.03.15.02.02.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 02:02:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-104181-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=luIYzghi; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-104181-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104181-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A12C41C2256A for ; Fri, 15 Mar 2024 09:02:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5314F175AA; Fri, 15 Mar 2024 09:02:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=deller@gmx.de header.b="luIYzghi" Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E88961758D; Fri, 15 Mar 2024 09:02:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.22 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710493355; cv=none; b=nAtlT6lNOLSs4rFen5/jJp1CesmjOPyxXnVXXvNo8qYoCsvSN8onF585IWMWY4eYYL3iIv2q0Gp5PuhZqvmfHrOJE3pTyXEdbLrphOm3DqBw80bIsQ2ho+VvmcCSem5ItE82X/aaCUJT1T/QCk1tdMGuShtOLCUUd9dFUL/Ur2Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710493355; c=relaxed/simple; bh=bwCR+VnsxqQgPasjc/7mEkkM562fmlEMD5U1h82YHVI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=adN4cMrEfSHYF+/7v/aYCehgQvYzBvUy1FKZAMcnITK4i+d0hspbI2ijx14DTe0XcX7GXcZEHHpyUvcxPwu4mCSYQVDfdmUspwO9jKOXHgp6uU8gvff2KmI1R5LHw73iXt+O0gBbZaIhajLbtF69Ff5IMzk/RoufpBOjEMO+V0w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=deller@gmx.de header.b=luIYzghi; arc=none smtp.client-ip=212.227.17.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1710493346; x=1711098146; i=deller@gmx.de; bh=8QSAngh93Fh7RS7D0R2QjSELDi+nntpa83PPWvfuPLo=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=luIYzghiLxwdAyZ83XQhMDwCJSaGBXxBhjpmWMy59qPfp6J1cT51m4X92EhgbjYD yfyEvPMfYk0GCKrU6YzkNO2wbpkYxYQAnmgvXuuPhEElvTB/1jIMgBbu9BhUfiXfA yfGxAQxRKGpUt5iMK6KNgQi0JctEvZQpoxxJi0HFBxsqGYjxsaGXQwVZTrlOURrbs EltPPsJV0qSGUVgmRAuUlkDO9sAuLmZeg2Gn1+xxKIH4v/T6eM8ZWkcn9gbO6oMIW 67g46eu4XQW8hGEpA2ZokTD+m5zi7EM40+44mXhGSmzfYUzQj7JWLfQfYuNvGx8cN 2BhpEpRNiCoPDsm84w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.20.55] ([94.134.155.107]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M9Wyy-1rfZHa0hQS-005VuE; Fri, 15 Mar 2024 10:02:26 +0100 Message-ID: <5fccb301-4119-4b26-accb-abc24ade2b0d@gmx.de> Date: Fri, 15 Mar 2024 10:02:24 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] fbdev/mb862xxfb: Fix defined but not used error Content-Language: en-US To: Michael Ellerman , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, tzimmermann@suse.de References: <20240229115010.748435-1-mpe@ellerman.id.au> From: Helge Deller Autocrypt: addr=deller@gmx.de; keydata= xsFNBF3Ia3MBEAD3nmWzMgQByYAWnb9cNqspnkb2GLVKzhoH2QD4eRpyDLA/3smlClbeKkWT HLnjgkbPFDmcmCz5V0Wv1mKYRClAHPCIBIJgyICqqUZo2qGmKstUx3pFAiztlXBANpRECgwJ r+8w6mkccOM9GhoPU0vMaD/UVJcJQzvrxVHO8EHS36aUkjKd6cOpdVbCt3qx8cEhCmaFEO6u CL+k5AZQoABbFQEBocZE1/lSYzaHkcHrjn4cQjc3CffXnUVYwlo8EYOtAHgMDC39s9a7S90L 69l6G73lYBD/Br5lnDPlG6dKfGFZZpQ1h8/x+Qz366Ojfq9MuuRJg7ZQpe6foiOtqwKym/zV dVvSdOOc5sHSpfwu5+BVAAyBd6hw4NddlAQUjHSRs3zJ9OfrEx2d3mIfXZ7+pMhZ7qX0Axlq Lq+B5cfLpzkPAgKn11tfXFxP+hcPHIts0bnDz4EEp+HraW+oRCH2m57Y9zhcJTOJaLw4YpTY GRUlF076vZ2Hz/xMEvIJddRGId7UXZgH9a32NDf+BUjWEZvFt1wFSW1r7zb7oGCwZMy2LI/G aHQv/N0NeFMd28z+deyxd0k1CGefHJuJcOJDVtcE1rGQ43aDhWSpXvXKDj42vFD2We6uIo9D 1VNre2+uAxFz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/yWf FwRDcGV6nxanxZGKEkSHHOm8jHwvQWvPP73pvuPBEPtKGLzbgd7OOcGZWtq2hNC6cRtsRdDx 4TAGMCz4j238m+2mdbdhRh3iBnWT5yPFfnv/2IjFAk+sdix1Mrr+LIDF++kiekeq0yUpDdc4 ExBy2xf6dd+tuFFBp3/VDN4U0UfG4QJ2fg19zE5Z8dS4jGIbLg== In-Reply-To: <20240229115010.748435-1-mpe@ellerman.id.au> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:oa3Lg6BTYi/59RnYVtUSbuy01UHFdC0MXqi5ZN7nMXUHEle99vW BvXMz4V0bAUE2IY/GfuHS0+98S76AaGsfBkTHQsaSEZmfocavvv0q0yT1FehHFAPIFvWujA jhQ0BeLa2YbMxQUbvC55vs0xcSCRpX7UkOUr/swqjDl0A0SQhUb1KwrAx96ND/gaR1s/697 0OrsiskN5jiCuZgsGW5mA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:eF0nIZtkgwE=;RU7KXo1IKfoT2UTfCt87aJSd7aS IlpUCHigT7ccCuMrsA8ZNN3GBn49gf1U/ZOXWSkDvTjtqdEBKC/wP6j7rSnWYcX7bjm6FwBn0 qShFiq6QIDDk7QGdFGwTxwPBO+5+mNiJgoXMNlmaQJDg2SDSiRMBcM3kacfgJkn9/u6AXxxYD 7B2P9VpZ86ydaetkb/1PZiXQl9u1dqJX5WNOrIIXugy7Fz54aSnKzxGodRfgHpQcVA7vi7AMA trIb1Vstgl+zw7xyf/U3Yu97GlADu7vYFE1rYsZd2KzTIXZNo8/PTy8955rYW11dYtBihFsfy odJ8mzm8elOaOp/67pGP8BR7hFMFh8OafkZQmoEGJGwr/WvNPOVeiuOMd37uMfDJEwp3xGQ+1 6jBJzV6aibgcIGWQksgDwtNe4CzTBeno+xgXbJse8pc90grNsBUCaBf/0Brw2ww4AnNjQI0yl 4rmTyTMnoh5SqnE16KjHmNtUIXpMsSVxaOj517kZJYvoW0zwSRyHyAiAPCnUQuz+XJxK0AAP0 egeEEp7REIEe46iEOYbo1tkuHOhGEMHNDTYE6+7ZFUlwDrAI4RIkrDcj4XNZkbhbxIUisF1cb o9UtykUZmiBCUeFPsZlFPg7On/LjZTjnfdHCexc/EQaDlWMrmOIHfJfmatyU31ysb6bFwWXHl iZtE/F/JKe9vBwp036AIS0hQhaid7HqAi4LCR7Rae+vIzctz7BWQRlGVOa1AQZbGmYV3YPXcL 4uYuvFEoWR0ks0Ii+PYDlEymFRM783waq7kx4uh+Kp6MfDhNZWCTMgAzR7BLP06slNZiU4uvK Mxld2tTxi1k8Tk6Z2y91UAzQWoefekQ7wSSDWxb/wvf6I= On 2/29/24 12:50, Michael Ellerman wrote: > socrates_gc_mode is defined at the top-level but then only used inside > an #ifdef CONFIG_FB_MB862XX_LIME, leading to an error with some configs: > > drivers/video/fbdev/mb862xx/mb862xxfbdrv.c:36:31: error: =E2=80=98soc= rates_gc_mode=E2=80=99 defined but not used > 36 | static struct mb862xx_gc_mode socrates_gc_mode =3D { > > Fix it by moving socrates_gc_mode inside that ifdef, immediately prior > to the only function where it's used. > > Signed-off-by: Michael Ellerman applied. Thanks! Helge > --- > drivers/video/fbdev/mb862xx/mb862xxfbdrv.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c b/drivers/video/= fbdev/mb862xx/mb862xxfbdrv.c > index 7c402e9fd7a9..baec312d7b33 100644 > --- a/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c > +++ b/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c > @@ -32,15 +32,6 @@ > #define CARMINE_MEM_SIZE 0x8000000 > #define DRV_NAME "mb862xxfb" > > -#if defined(CONFIG_SOCRATES) > -static struct mb862xx_gc_mode socrates_gc_mode =3D { > - /* Mode for Prime View PM070WL4 TFT LCD Panel */ > - { "800x480", 45, 800, 480, 40000, 86, 42, 33, 10, 128, 2, 0, 0, 0 }, > - /* 16 bits/pixel, 16MB, 133MHz, SDRAM memory mode value */ > - 16, 0x1000000, GC_CCF_COT_133, 0x4157ba63 > -}; > -#endif > - > /* Helpers */ > static inline int h_total(struct fb_var_screeninfo *var) > { > @@ -666,6 +657,15 @@ static int mb862xx_gdc_init(struct mb862xxfb_par *p= ar) > return 0; > } > > +#if defined(CONFIG_SOCRATES) > +static struct mb862xx_gc_mode socrates_gc_mode =3D { > + /* Mode for Prime View PM070WL4 TFT LCD Panel */ > + { "800x480", 45, 800, 480, 40000, 86, 42, 33, 10, 128, 2, 0, 0, 0 }, > + /* 16 bits/pixel, 16MB, 133MHz, SDRAM memory mode value */ > + 16, 0x1000000, GC_CCF_COT_133, 0x4157ba63 > +}; > +#endif > + > static int of_platform_mb862xx_probe(struct platform_device *ofdev) > { > struct device_node *np =3D ofdev->dev.of_node;