From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CC402C19F2D for ; Tue, 9 Aug 2022 19:14:40 +0000 (UTC) Received: from localhost ([::1]:55194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLUgZ-0000ux-L1 for qemu-devel@archiver.kernel.org; Tue, 09 Aug 2022 15:14:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLUeL-00071r-BK; Tue, 09 Aug 2022 15:12:21 -0400 Received: from test-v6.fluff.org ([2a01:4f8:222:2004::3]:40962 helo=hetzy.fluff.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLUeI-0005QN-M8; Tue, 09 Aug 2022 15:12:21 -0400 Received: from ben by hetzy.fluff.org with local (Exim 4.89) (envelope-from ) id 1oLUeD-0008Bd-GD; Tue, 09 Aug 2022 20:12:13 +0100 Date: Tue, 9 Aug 2022 20:12:13 +0100 From: Ben Dooks To: Ben Dooks Cc: qemu-devel@nongnu.org, qemu-riscv@nongnu.org, Alistair.Francis@wdc.com, peter.maydell@linaro.org, qemu-arm@nongnu.org Subject: Re: add qemu_fdt_setprop_strings() and use it in most places Message-ID: <20220809191213.v7auszvz6r7uczw6@hetzy.fluff.org> References: <20220809185639.750345-1-qemu@ben.fluff.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220809185639.750345-1-qemu@ben.fluff.org> X-Disclaimer: These are my views alone. X-URL: http://www.fluff.org/ User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ben@fluff.org X-SA-Exim-Scanned: No (on hetzy.fluff.org); SAEximRunCond expanded to false Received-SPF: pass client-ip=2a01:4f8:222:2004::3; envelope-from=ben@fluff.org; helo=hetzy.fluff.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Tue, Aug 09, 2022 at 07:56:34PM +0100, Ben Dooks wrote: > Add a helper for qemu_fdt_setprop_strings() to take a set of strings > to put into a device-tree, which removes several open-coded methods > such as setting an char arr[] = {..} or setting char val[] = "str\0str2"; > > This is for hw/arm, hw/mips and hw/riscv as well as a couple of cores. It > is not fully tested over all of those, I may not have caught all places > this is to be replaced. I've put a github repo up with this and possibly some other bits I am working on: https://github.com/bendooks/qemu/tree/dev/fdt-string-array-v4 > Changes: > > v4: > - fix checkpatch issues > - remove error checking in hw/core/guest-loader.c > v3: > - fix return value for the call > - add better help text > v2: > - fix node/path in comment > > > -- Ben Dooks, ben@fluff.org, http://www.fluff.org/ben/ Large Hadron Colada: A large Pina Colada that makes the universe disappear.