From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (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 0557826E711 for ; Wed, 1 Apr 2026 05:29:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775021380; cv=none; b=Q1+9A0dneSnIvVweKwLxe2stPkovLZy1C8blcilTg4EDAYcekdmbISeShbOyau51+i9Kcstl3gLlAR4lHwrY0d+V10USvhjnEXnrKf2Yi03Ciy9z0sM7W3GPe86EhirOARXqp/9pGBJLxVlcxL7QMgVGBy5KjtCM42MgiiyPzLk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775021380; c=relaxed/simple; bh=0q4cDVhWs7r2Gs4WByanJnCZWFpnSZmNNuwATSaOyQE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=oylc28oZZhFYjLQaAYAKu1jqC0lqdwt1Vw4Hb6CmQYF5BjhagJdHJzYVyfUL38DMFC9MIXS0meB7ZiM7sXP7e+rf63puzvtt3NYllvCbbFhujBMhIlFtBjWjrm6pQBEaVmv1Jn3t1YjRbgHSesBVEIp5oFrDcSqpvgpx3oV/OaM= 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=PqmXEQZG; arc=none smtp.client-ip=209.85.208.177 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="PqmXEQZG" Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-38ad12fb595so4575591fa.0 for ; Tue, 31 Mar 2026 22:29:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775021377; x=1775626177; 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=Yu5ATadLmeIKXKDnUV6wLFGo8FRHe0jqoFgw+ISiUKs=; b=PqmXEQZGHopxnnvIuH9R+S/ue0GKCigA5QUTWAiR6qMcx9MwNSr4rAG0sfZqr5E17b 6yIQdIXQwWIVnealQHuKYQw4J6TtsBSwiYXHsNYxR8EjHNZcaHMH3zeNlChFD587dAto YZyLhabrt/00AXO/WGEsmbyAl6ozchoTDaQGfiDxIlauaoSAGKmfrzArLYDJfiSynhXH 0kZfz1HoETSfRqnMCnptpvQj6euDIOqsWhuYkt+tPubUEMhfKOAB6tUBupPImR8j9iJy 6QEqS5U/fzpqj6XNhxvo14nZbq5TCpuiUPaeMFXUhqawN2CWujzFAA34T+nmHOxlb4OC V1Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775021377; x=1775626177; 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=Yu5ATadLmeIKXKDnUV6wLFGo8FRHe0jqoFgw+ISiUKs=; b=RuWjdnPDsFRW1TYBrOsxmk/7bbK5Q/oZLF0xN96AKdj2GLYCFNedXdYRqkoeagkL3Z 5WDTx3jIv4bLkYlgFmfWqff/KuKglktrcab1xgoOIybwTnZ+F7I7V/UaBN94raYcmcuL n8tCwubieCRagtfHRGjLIsS1DBmuEunqHHSf4oO4/VV7tzYRdCaqRDFDcgIV48nG5EPm PCiHepjqu4HQOauFoUxiuu1ZjRc0+z3tRRU8chWH8HB1U0OtEqS50qE+kj9NkiEvnKfl MMTq+TbtJ229Nb8saNU92TxOjZw+4B0Z93Udm5bX0KAyxHG6GzLqqPZzad5T8RLLQ140 v+Ng== X-Forwarded-Encrypted: i=1; AJvYcCXEUgtAtLaM2tBrmKJnjOrza2uXLGoGUtEAPqGcT+uKgpAeICkfUVjd/UjcROkah3yG18sRUK57DNJqocI=@vger.kernel.org X-Gm-Message-State: AOJu0YwozhOZzOdbMghGiA7I5THPGKGyZ+NrTahSUx5e92eLY9l3WY9b KwfT7jliOU1tA9UkgA5Rw0b/9H6R9CAaF6fYKlnTtUtsN9leGIgXJcT/ X-Gm-Gg: ATEYQzwJcyK4r9gr847HYJD46g+fErIXjbSUn1BITgJ5dohTo5U3vctNeuyz/j3D+2s 11cUEcg3ehF5XU/3qieY+gYiEdhaPRO7oPxxF8qk53mx7iX++AnMQcMR2gloWPzof061tnhHp+k U1IUP9HJd6DD2F+iYqd7M8xKQMBHlNSLlcpUm5KisaJEQ+vguU1aGaaEQOV983iVIpjfcsq2n2o /4Vo6IUw3u8QXOh1CFjHhXEzrys6KEv3JagCtFbScEWCKNEhZiljsqlC8+NMtzwvg1qn48uY93G mxUQkJoC8JeZ0LhMkdBwhh5VFX+egm/TuPEjOcnzLs3UnfxQq/siM6kbIEVwyCl8AuDUVn5FcZ9 QpKD5I0VGPS/u09HqZVAr0uq9dX0g1yeYxvw1DF1lErP2JPRuwSLTsbr6kaUzpFgD8jxpwJ8wH0 6W/AU8t3LIgS7jqrVjI91qjfpodbDha9ah8FQoSasqbgx1pKwixmy2dfdTCQ6rwoj8A/YixWudB CATvVm3 X-Received: by 2002:a05:6512:1591:b0:5a2:b383:c853 with SMTP id 2adb3069b0e04-5a2bab247a0mr2159847e87.26.1775021376824; Tue, 31 Mar 2026 22:29:36 -0700 (PDT) Received: from ?IPV6:2a10:a5c0:800d:dd00:8fdf:935a:2c85:d703? ([2a10:a5c0:800d:dd00:8fdf:935a:2c85:d703]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5a2b1443f46sm3178860e87.43.2026.03.31.22.29.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 Mar 2026 22:29:36 -0700 (PDT) Message-ID: <852bc121-3d7b-42bc-9a99-cd226e8bf3e0@gmail.com> Date: Wed, 1 Apr 2026 08:29:34 +0300 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 2/2] mfd: rohm-bd718x7: Use software nodes for gpio-keys To: Dmitry Torokhov Cc: Lee Jones , linux-kernel@vger.kernel.org References: <20260324-rohm-software-nodes-v3-0-edde5a0324d5@gmail.com> <20260324-rohm-software-nodes-v3-2-edde5a0324d5@gmail.com> Content-Language: en-US, en-AU, en-GB, en-BW From: Matti Vaittinen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 27/03/2026 18:10, Dmitry Torokhov wrote: > On Fri, Mar 27, 2026 at 12:55:55PM +0200, Matti Vaittinen wrote: >> On 25/03/2026 02:54, Dmitry Torokhov wrote: >>> + >>> + node_group = (const struct software_node *[]){ >>> + &nodes[0], >>> + &nodes[1], >>> + NULL >>> + }; >> >> Hmm. I suppose I was not explaining myself well. When I asked for a >> temporary variable, I was hoping to get rid of this syntax. Something like: >> const struct software_node *node_group[3]; >> >> node_group[0] = &nodes[0]; >> node_group[1] = &nodes[1]; >> node_group[2] = NULL; >> >> would look more familiar to me. Well, I suppose I can live with this if it >> is Ok to Lee though. Let's see if he has an opinion. > > This is simply a compound literal, part of the C standard since C99. It > allows skip explicitly declaring the dimensions of the node_group[] > array (which is "far" away from where we initialize it and it > potentially may get out of sync). > > We have quite a few in the kernel, DEFINE_RES_IRQ() and others for > example are compound literals under the hood. Yes. But ones I've seen have been wrapped in macros. I don't think I've seen open-coded one written directly to a call-site (although that's what the macros end up). Hence, this is not something I see typically when reading drivers. But as I said, if this is fine with Lee, I can live with this too :) -- --- Matti Vaittinen Linux kernel developer at ROHM Semiconductors Oulu Finland ~~ When things go utterly wrong vim users can always type :help! ~~