From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) (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 9D36F2E2EF2 for ; Tue, 6 Jan 2026 05:07:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767676078; cv=none; b=O2c8q+GS9qzZdKf1GN8s0iYhKTCxQPvbwr5i0z1eEQ/s+VhIqrcW51aoF5wBlHJ7vV3QYQeCPT6BvQFI6y8rhAFthI4dN4rNcn/jKvx+GWnGfBm+c2IxrWHsBdbWaa6gpm19ExE2fWGdYN7ht3FenpwNtGXzJ5gS1VZV931iIT8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767676078; c=relaxed/simple; bh=PvKsoC1yJDKXpvwc/Ywpgr06jgkkUxx9YT/NT7YJY4I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JkUvfNyUf9OvwMWizu8yAt1xec7AS5Idim5VYwT70fxcOpAJIa48Cc3XfxtbWVALrGk7LjmF1kSGgf8+w4zi59AJAMcZLGIl6WLrIcNGBbCgtZooi46IHlbJWBUELjeinDg9uXXarVYHsbOq3isDKnBO5xc4KcjibLGRjVH5rKI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dZwYEIHk; arc=none smtp.client-ip=209.85.210.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dZwYEIHk" Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-7f0da2dfeaeso684163b3a.1 for ; Mon, 05 Jan 2026 21:07:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767676074; x=1768280874; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=0gtGPUtnrtvwlzSCngVczC/q2RK/CQdmnl4xMzqGXCo=; b=dZwYEIHkOayOmYUN/scZL4w+LGYKtSWb4tlzh1I5U1dKaTGq0Fq8WAe3/CwDjP+t2E nQ8VEYumnw0hEwDq8UayVuuQog66HijgcCap4hmiHb7/8AGinH89vc9ioTjLRgcGc9Gl EvWxPfaHKebNl34GTnujf3zEvF7qHNIRbJDv5WPl8QnZ3UWX6JsCEapg0PXrEnpGLRbS cxUmuX57zjb4eZWhJctI7jL/AwOdg5p1YhLy0TEfQ2/KCHM7I+9haato5/78xcgKFo2z e+yOVFodcaw1DWd8feNCIqm7tAWOObMB4ynhTfv5nZxVjXb/oY1hOL89FbggKpthQCA+ zrOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767676074; x=1768280874; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0gtGPUtnrtvwlzSCngVczC/q2RK/CQdmnl4xMzqGXCo=; b=tR0r1CXP9zz9EfMvnBpo2BpWdnhNyI0SclTmJW0mSPgHgP/Y6pXo/UzCM6SZRhcY85 /O3ZOEMNS+kJxN70gOmTWV/Lh+0nLUkkZPWa0cMyBEK+Xx/7z7yPOOqQqpDwfoV6Ftnb SbQPZ8fu3MUqKmO/Lg8Nm2gW18zMzkv2TgPPKcsw+o9+a8qz4G63FWZf4cESs2cxvxt3 r9Ozo6+7f0ov1+HGMsTif571K5DEBRgl2C3qMzsd5wMxexMhDACU/49NIRvM32Ex4mOs W0hWlMsw+rI5mkdgt05isr+GYEpIkTGXE0cymwwPgRrNy4pmsxlAb6x0ObhbxQJUYjvU TfgQ== X-Forwarded-Encrypted: i=1; AJvYcCUN+6w5cuZPgYf9CsLnHZCu+91tkk+Et40lH4zbb9ax8w8QkuBbkTAKcM8QsXKG3ZOlW1wJMxvxND171ho=@vger.kernel.org X-Gm-Message-State: AOJu0Yyw3XGTAMBwcIZktGRDq4GcXz79q+4GN6MkdSl+mOX2uC+sAnTw H8qOv9MRFr/Itud0YLGKz7/p/3mQUREvIO2xNDM235izLJ9Xtlsb32u2 X-Gm-Gg: AY/fxX7/QHfmqqCQV82v27P3mEUDmdaAFNfZSGEFy7HrrTOeQ9ov6jGF27iBKlfmqtG U9glLQXOkPV9/RUFnkjJ8y/3FB/QfLLm4ayV3N1nC+spf9O1LI7sng+OaXpsqGJrthVvNvVX3aN yKuThdL8BKHlAp/LX7bm7+T94pteyf5Lt+uFpCshZqKFZD1hLd7ltruZ3sdppmJ1jtfGxmLzaej +5rUJw4/4b3xOhAZ8jJin6VDs9/korPxYC9/MRk/Piq3kTW2dmX1WyuGeX20BRbkdR8KEpf7pq+ Gh0nvNcWmphqooM+mRcXtSkdOVAn2Zo8ZKqZnmRNFfAvigvLNiFDETLQXZx9Im9yTW6SMYdbbVp JQUfyDVo7Xu34p+9mYCMbQjhWhgwrCJEgy2aN1cYKgRjfnYkITImsnFShOwzgS4kpm/2UJLaUT2 6GUU+rK07UXraa3cE7uGN58f1kUb5QL7WlpuIU9fjT8uq151hr07B2ptiI8QGv X-Google-Smtp-Source: AGHT+IELk3bSN8b6/uvhBy79lAtP4nFKRyXfqVo09Vl9Sea1jJstOayAx+4sJKgZc+BInTNtDc92kA== X-Received: by 2002:a05:6a00:f8e:b0:7f6:2b06:7129 with SMTP id d2e1a72fcca58-8187f4a1122mr1578438b3a.43.1767676074134; Mon, 05 Jan 2026 21:07:54 -0800 (PST) Received: from ?IPV6:2601:1c0:5780:9200:980d:1373:5653:99ac? ([2601:1c0:5780:9200:980d:1373:5653:99ac]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-819c52f8ff7sm752055b3a.37.2026.01.05.21.07.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Jan 2026 21:07:53 -0800 (PST) Message-ID: Date: Mon, 5 Jan 2026 21:07:52 -0800 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 v3 4/4] fbdev: sh_mobile_lcdc: Make FB_DEVICE dependency optional To: Andy Shevchenko , Helge Deller Cc: Helge Deller , andy , linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20251230052827.4676-1-chintanlike@gmail.com> <20251230052827.4676-5-chintanlike@gmail.com> <73007a0a-dd96-43eb-be2e-ccbf8b19cd79@gmx.de> Content-Language: en-US From: Chintan Patel In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 1/3/26 05:15, Andy Shevchenko wrote: > On Sat, Jan 03, 2026 at 10:59:44AM +0100, Helge Deller wrote: >> On 12/30/25 19:25, Chintan Patel wrote: >>> On 12/30/25 00:13, Helge Deller wrote: > > ... > >>>>> -ATTRIBUTE_GROUPS(overlay_sysfs); >>>> >>>> Instead of replacing the ^ ATTRIBUTE_GROUPS() by the code below, >>>> isn't it possible to just mark the overlay_sysfs_attrs[] array >>>> _maybe_unused, and just do: >>>> + #ifdef CONFIG_FB_DEVICE >>>> + ATTRIBUTE_GROUPS(overlay_sysfs); >>>> + #endif >>>> >>>> ? >>> >>> Yes, the __maybe_unused + #ifdef ATTRIBUTE_GROUPS() approach would work. >>> >>> I went with the PTR_IF(IS_ENABLED()) pattern because Andy suggested >>> using PTR_IF() to conditionally include overlay_sysfs_group in >>> overlay_sysfs_groups, and to keep .dev_groups always populated while >>> letting the device core skip NULL groups. This avoids conditional >>> wiring via #ifdef and keeps the code type-checked without >>> CONFIG_FB_DEVICE. >>> If you still prefer the simpler #ifdef ATTRIBUTE_GROUPS() approach >>> for this driver, I can switch to that, but I wanted to follow Andy’s >>> guidance here. >> >> I assume Andy will agree to my suggested approach, as it's cleaner >> and avoids code bloat/duplication. Maybe you send out a v4 with my >> suggested approach, then it's easier to judge... ? > > I'm also fine with original code. But a suggested approach would work as well > (at least like it sounds from the above description). Ideally would be nice to > get rid of ifdeffery completely (that's why we have PTR_IF() for), although > it might be not so readable. TL;DR: the most readable solution is the winner. > Thank you both! I will send v4 with Helge's suggestion and take it from there.