From patchwork Thu Jan 11 14:39:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 761857 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e02:0:b0:337:62d3:c6d5 with SMTP id h2csp2429841wrz; Thu, 11 Jan 2024 06:39:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IFcALwde0U9jNuFLmBoubVj49UtLfMrPMxbJnH1PX20gWZUm67SllVdq9Zxa9erxpAvgfaa X-Received: by 2002:adf:c784:0:b0:337:64eb:1c4 with SMTP id l4-20020adfc784000000b0033764eb01c4mr722162wrg.7.1704983984125; Thu, 11 Jan 2024 06:39:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704983984; cv=none; d=google.com; s=arc-20160816; b=czEhPCguHGk7UkENDiyUC53HfTeh2ffhHszekoA8pJtN/E43xeHfH2C0MSAdOFKekF H7V1P3Ix92fcT57DEufMAuEi2tuZ6gWxhzKzYnvds7drABPRpWXvTjlPDefft7sfGXg9 JMOkACeAfUNSp3pDOnt5OwdV8tB9eiIByIVVldkaZ0f7jE625sBsoC1BzrtjsuDtQANa c0JmFs07ZVlV1wmaNAEi/Q6lEfxrGLBibBmliGbNOH5JUn8fv5D7xfdgrx10pDs8xVdK Sd0JVv4P5yPjyb6ucl1bc2T6EGbeKhIAmxfbaUNgRykNuzFzepLvKdMOfoDlHNBY1FIY 0HSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=wVMMSLbnmuEPTte6BBeZUkwUzzU7PQi11ajtPdJh2LE=; fh=Qha6wJxWwFQVGcPpfhEfoHoQ7NCfPZrKBMSoDD8387w=; b=oGGUSQ39/kW6k1y6LujktXR7cnb45BITSIYiCfKAUYqMYHAlpz7RdXzIv9cDpsXmNw /OoPLPVy1JtOjtEVwhbd+FV2TsdxE3V8ZRoDPtuBjrcsjzgm3p59Cq4zD2f51Zm0/Otj KGP/R+TvuM4MOM5BY5vk4yfIOKgG9co+JAT2ES40bbIev3PLgeu8QxE9Nxn214kN9Da3 /zrreZze8vZC6Wf4dI5li23cUHXuVqLX6OfuBXU/gdj5jafYNA/xXBYgOnmg1lyhgW/F yyaSuuRP6eE+Y+nclvlnzHWyugy61wGQ31yi5KlI/ufm4h5Hk1Jzdb5yddukJyFk9D8M O8Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gBxjp7Y1; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id m10-20020a056000174a00b003365bf62dc0si671885wrf.262.2024.01.11.06.39.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 06:39:44 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gBxjp7Y1; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 89D288753C; Thu, 11 Jan 2024 15:39:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="gBxjp7Y1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 25AE1877FD; Thu, 11 Jan 2024 15:39:42 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 372638749F for ; Thu, 11 Jan 2024 15:39:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a28f66dc7ffso1165736366b.0 for ; Thu, 11 Jan 2024 06:39:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704983979; x=1705588779; darn=lists.denx.de; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=wVMMSLbnmuEPTte6BBeZUkwUzzU7PQi11ajtPdJh2LE=; b=gBxjp7Y1QwWiB4nAWmc9ijtHpPwtBNvO467ikvPUuofQQVqWg5R75qeHhKcA136I4Y VL6zHaYUiatcyqHeAF20CyCdYYHT+Tn9r7TnDzmxU01JnJidKwsZj99cbMtZ7ve2Lk4g zuW/gAtiHo6eqZSB/t81ZK0gArfXqyJAunOz4t6+WJYk4QAPzvFT+nYCGL1qp+KKREtF U4YaqUxr1oB+QxJhxjV7dqUejRHjE+gqBYiQZmLy1iKJuP5TsCgBAVvyCt2MuSKb7Zws n5j3qPqEYrKf6+Dmdiv8QuXWZJ3v9u3JMx72kVKey/km8WmK3Gu1+6c033e0TM+19xtA ZDzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704983979; x=1705588779; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wVMMSLbnmuEPTte6BBeZUkwUzzU7PQi11ajtPdJh2LE=; b=pjQjvoNsm/OHsnsVPk/xFjl1I4Ul53kGx7YY6kPANvPItSK80jRq8Idfm3a7tKZPHj zeMx147/nF2Nb+9OQGvhie/vi2im6b8xkjHJcfsIvFVDR9vV0O4CgmGPDv2YpGwtPQp6 sNLyhVhocEHKAmRqb9lBpb9osLZ0IRJk9Rb3GjV+xPJI39yGCrZ5WWkmjQdsAHKth8nK pwClZ6U0DdhGdU12qlOWp0OF3M1Zy0IVxlNMff7allyfGCdftoLpORPrZU1POzS291eB QMaZdoe+7u7wL/8vpFgPvMR3kut987JbXGH5xKPaHuaXHEY3EoV5zMpSIoYN+zQ2ibjS K9Fg== X-Gm-Message-State: AOJu0Ywn1fG14US80IthFtSb/4sePSVHLXoy4rSn5TrGky4zMXrScuf6 /00s2rFBfWIZtexWxY89Df53vorMU7j9pRI/yUGRAUR/3OU= X-Received: by 2002:a17:906:1d6:b0:a2b:a4c1:52ef with SMTP id 22-20020a17090601d600b00a2ba4c152efmr996056ejj.3.1704983979579; Thu, 11 Jan 2024 06:39:39 -0800 (PST) Received: from hades.. (ppp089210121239.access.hol.gr. [89.210.121.239]) by smtp.gmail.com with ESMTPSA id j25-20020a1709066dd900b00a26af4d96c6sm655062ejt.4.2024.01.11.06.39.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 06:39:39 -0800 (PST) From: Ilias Apalodimas To: u-boot@lists.denx.de, trini@konsulko.com Cc: Ilias Apalodimas , Simon Glass , Heinrich Schuchardt , Peter Robinson Subject: [PATCH 1/2] smbios: shorten sysinfo_str declarations and use Date: Thu, 11 Jan 2024 16:39:35 +0200 Message-Id: <20240111143936.983448-1-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean sysinfo_str is a bit too long and makes indentation weird. Shorten it to si_str. Signed-off-by: Ilias Apalodimas --- lib/smbios.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.37.2 diff --git a/lib/smbios.c b/lib/smbios.c index 41aa936c4c41..47db410a2141 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -48,20 +48,20 @@ DECLARE_GLOBAL_DATA_PTR; /** * struct map_sysinfo - Mapping of sysinfo strings to DT * - * @sysinfo_str: sysinfo string + * @si_str: sysinfo string * @dt_str: DT string * @max: Max index of the tokenized string to pick. Counting starts from 0 * */ struct map_sysinfo { - const char *sysinfo_str; + const char *si_str; const char *dt_str; int max; }; static const struct map_sysinfo sysinfo_to_dt[] = { - { .sysinfo_str = "product", .dt_str = "model", 2 }, - { .sysinfo_str = "manufacturer", .dt_str = "compatible", 1 }, + { .si_str = "product", .dt_str = "model", 2 }, + { .si_str = "manufacturer", .dt_str = "compatible", 1 }, }; /** @@ -108,12 +108,12 @@ struct smbios_write_method { const char *subnode_name; }; -static const struct map_sysinfo *convert_sysinfo_to_dt(const char *sysinfo_str) +static const struct map_sysinfo *convert_sysinfo_to_dt(const char *si) { int i; for (i = 0; i < ARRAY_SIZE(sysinfo_to_dt); i++) { - if (!strcmp(sysinfo_str, sysinfo_to_dt[i].sysinfo_str)) + if (!strcmp(si, sysinfo_to_dt[i].si_str)) return &sysinfo_to_dt[i]; }