Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp231814lqg; Thu, 11 Apr 2024 00:30:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX8fSWzUReZEJehG5P1F8okumVokH7MlFKGwDJh6ksxMsgvE1jxEcB9dVzuALHcy3a6Ajc7q5hqTiKKVZHdT+uAOnQkyDClWSN7+Z7/Ig== X-Google-Smtp-Source: AGHT+IHVH24jurrTzWgrL3CFGKp5LvsAAeEsp06jAi17y+BJ379dDKiiJ6db0TFHICjWyGUhFkka X-Received: by 2002:a05:622a:110:b0:436:4e4c:3bb2 with SMTP id u16-20020a05622a011000b004364e4c3bb2mr3116942qtw.14.1712820655432; Thu, 11 Apr 2024 00:30:55 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s26-20020a05622a1a9a00b0043462d00ff7si953833qtc.176.2024.04.11.00.30.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 00:30:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139969-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-139969-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139969-linux.lists.archive=gmail.com@vger.kernel.org" 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 2CB081C22446 for ; Thu, 11 Apr 2024 07:30:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A0F0E13E054; Thu, 11 Apr 2024 07:30:48 +0000 (UTC) Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 860B013CA86 for ; Thu, 11 Apr 2024 07:30:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712820648; cv=none; b=rbTVah+ufqWYSBsW71fsmqlcmH8Vuc3xdffYcNfwPLgl0L0eQemOSHgiviLUjFc0pOs/E+SfbSmkxhXaM4x62Kfc4aEj30RG+zna6kmGeJj5Fmtlg/PU2NbvMBnORcBxz2zMTEavAHQqufT+lF+CxF0JKdFIwZcqFjO4Ys3qbuA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712820648; c=relaxed/simple; bh=pez9jQTDttZQRiqEOkAfLPa9CfiiZp95gi1hVzEfONY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=A77b4uhniu6I0XbHHgHagbjJmG/wLikK9BO6UWtw9aQmx4r3nRtMwlrtc285V3685MftF46XW8SaQRaDBIlgJBKQseSMu/Iv4/AgXQWN4o3NPoP7tSxLnyiRvFl83HA8WE6kxmteTEN3PFtAWZM36nn1EZtkMMD2v17XbkJ3TZE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.128.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-61816fc256dso39225597b3.0 for ; Thu, 11 Apr 2024 00:30:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712820645; x=1713425445; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=huaVbJOvsvC89aSq/ljpkq5lTpDfnQw7dMOaaZfbyEI=; b=wv9h+rrSz94Mw5x8TK2t+aXkupV1LU6POAXGs1NtnKoBiL2v9CQL11MO17Vp5FdzEN P2/THpB92gJn/GnUGSh8fbMjLYWxbrw7De9UzMn4rxB3qPTvRARnXtTA+iAa4cpBF5dA 8F4xALlXEfsPkANWffhnCO9oWe3HX5ytmMe8ubtbqY1ffiqWejNGoUop7+g1mywQ4QZj 4MuE3yZ9U3WRH+msHPTtBKtDarXNf3uVWtyXJi+ef5Fe6mdpOOgAZl9+qspPxXinjwuQ j5KxlFa7ltMlSTBiPV8NY0Oa92agc+EGNI6u9bcHHIXnZZZiOvQoLgoM2/9VJ03B2Ptv SrSw== X-Gm-Message-State: AOJu0Yx4ibTFmLaMx5L2jfF/pdv5/wMrMaHmSKz96p2PFuwkUQYgS5Y0 32EDQevUTjjBRabDwS/C9uBsYn7oLRnz1inlpnbIB7g6geTqtzHRpW6KZkgz X-Received: by 2002:a0d:d80f:0:b0:615:35e1:e512 with SMTP id a15-20020a0dd80f000000b0061535e1e512mr5222535ywe.0.1712820644764; Thu, 11 Apr 2024 00:30:44 -0700 (PDT) Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com. [209.85.219.182]) by smtp.gmail.com with ESMTPSA id u1-20020a81e601000000b006167f45edf9sm192819ywl.89.2024.04.11.00.30.44 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Apr 2024 00:30:44 -0700 (PDT) Received: by mail-yb1-f182.google.com with SMTP id 3f1490d57ef6-db4364ecd6aso7939539276.2 for ; Thu, 11 Apr 2024 00:30:44 -0700 (PDT) X-Received: by 2002:a25:bc4b:0:b0:dc7:43fe:e124 with SMTP id d11-20020a25bc4b000000b00dc743fee124mr5115225ybk.11.1712820644434; Thu, 11 Apr 2024 00:30:44 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240409161523.935384-1-andriy.shevchenko@linux.intel.com> <20240409161523.935384-3-andriy.shevchenko@linux.intel.com> In-Reply-To: <20240409161523.935384-3-andriy.shevchenko@linux.intel.com> From: Geert Uytterhoeven Date: Thu, 11 Apr 2024 09:30:31 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 2/2] auxdisplay: charlcd: Provide a forward declaration To: Andy Shevchenko Cc: linux-kernel@vger.kernel.org, Andy Shevchenko Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Andy, On Tue, Apr 9, 2024 at 6:15=E2=80=AFPM Andy Shevchenko wrote: > While there is no compilation error, strictly speaking compiler > should know about used types beforehand. Provide a forward decoration declaration > for struct charlcd_ops before using it in struct charlcd. > > Signed-off-by: Andy Shevchenko > --- a/drivers/auxdisplay/charlcd.h > +++ b/drivers/auxdisplay/charlcd.h > @@ -36,6 +36,8 @@ enum charlcd_lines { > CHARLCD_LINES_2, > }; > > +struct charlcd_ops; > + > struct charlcd { > const struct charlcd_ops *ops; No forward declaration is needed at this point, as ops is a _pointer_ to the structure. > const unsigned char *char_conv; /* Optional */ Gr{oetje,eeting}s, Geert --=20 Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k= org In personal conversations with technical people, I call myself a hacker. Bu= t when I'm talking to journalists I just say "programmer" or something like t= hat. -- Linus Torvalds