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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9E917C43334 for ; Thu, 23 Jun 2022 12:19:10 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 92AB6842E0; Thu, 23 Jun 2022 14:19:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="dlgxLwe2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6BBF38432F; Thu, 23 Jun 2022 14:19:06 +0200 (CEST) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (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 2E074842B7 for ; Thu, 23 Jun 2022 14:19:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72d.google.com with SMTP id z12so347004qki.3 for ; Thu, 23 Jun 2022 05:19:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1Wz/wEeNoLjlvqZrn4i4VFMNMvRJpkfsIv6XS20Fr6o=; b=dlgxLwe2nUvlDRVNloiZqXl/bSKds5OmnuTvp75ZCBLHxBzmQq7XmLPTcTI1NtXCjS vL9XUxn/wZ6tscBlgyTynP7Ef2JhiI7JZiuNOOAnyrSusig5gQ54aR9zhzipPKhIN/sR 5QIlTBx0Owv2sS0cFMZJL1EBS1Km6u8xhFh8Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=1Wz/wEeNoLjlvqZrn4i4VFMNMvRJpkfsIv6XS20Fr6o=; b=0C1hosyJuJZa0R5QDvbbRwgwiS+ajz1YvgzM31AX3fD5vuBrxJRoumZdDo8Dp6k7QM /e+AMFqjZaXGT0f01ee028o86ydcATFNiizdnPkppLMtD8yTWgyM4LzerUf/LtrYv2Kh H87l7KY6ZHyXapfLAQarGKVVvvA4+GG7ncnmhfJUq2+UyLa8zHywgY0kfv0xsuWvmlbV AlB8KbjgyelyU9IJBQBdiDAl3VFWnK3kKOQPBqeAZ/v+X1A2jE9RbzqPTlMRtwgoe+cF kZggCCeOmM5U8qYXmV1BBpVnoFQWMJNo9vZ/RsPvlErPGgQI9uhgEB5QxDWoeUDvBe/+ 4mOg== X-Gm-Message-State: AJIora8VPW6QRAHkHK9LIqIICj7bUy4S4+30Fj3wImYApPqR5V7Rk++h Gl6lu+4ESHayS7TDk43YBFC0v/NR1HeIgg== X-Google-Smtp-Source: AGRyM1vXW8a8fPqkRA2yKdO3x1B6QjHH5+4i/cADW2f/HHjRu6yDjb3cCMHnaIy8PHSWkxW75lNT1w== X-Received: by 2002:a05:620a:1583:b0:6ae:f823:f89c with SMTP id d3-20020a05620a158300b006aef823f89cmr931746qkk.668.1655986741689; Thu, 23 Jun 2022 05:19:01 -0700 (PDT) Received: from bill-the-cat (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id w13-20020a05620a444d00b006a9901130b2sm20736525qkp.86.2022.06.23.05.19.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jun 2022 05:19:00 -0700 (PDT) Date: Thu, 23 Jun 2022 08:18:58 -0400 From: Tom Rini To: u-boot@lists.denx.de Cc: Bin Meng Subject: Re: [PATCH] cmd/misc: Stop using a function pointer Message-ID: <20220623121858.GD2484912@bill-the-cat> References: <20220622201018.225713-1-trini@konsulko.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="q26j2+AERjcPSnRO" Content-Disposition: inline In-Reply-To: <20220622201018.225713-1-trini@konsulko.com> X-Clacks-Overhead: GNU Terry Pratchett 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.6 at phobos.denx.de X-Virus-Status: Clean --q26j2+AERjcPSnRO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 22, 2022 at 04:10:18PM -0400, Tom Rini wrote: > Currently, enabling CMD_MISC gives: > cmd/misc.c:67:25: warning: assignment to 'int (*)(struct udevice *, int, = void *, int)' from incompatible pointer type 'int (*)(struct udevice *, in= t, const void *, int)' [-Wincompatible-pointer-types] >=20 > Because 'misc_read' takes a void * and 'misc_write' takes a const void > *, both of which make sense for their operation. Given there's one > place we make use of the function pointer, just call read or write > directly for the operation we're called with. >=20 > Reviewed-by: Bin Meng > Reviewed-by: Sean Anderson > Signed-off-by: Tom Rini Applied to u-boot/next, thanks! --=20 Tom --q26j2+AERjcPSnRO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmK0WisACgkQFHw5/5Y0 tyxbvgv+O26ADlmexxlCfVZRB9rCs1CDmYld2eooQeJj7+ig/lOGNYODmcBRqjXm YB/sKRmqcnfh8UdQvpql0N35DOhoTSpjoXy7W6KXtcsg/H3iy9gMNoFOzYUEQO32 fWM+QEnU8J82a5/7VvUBanMrAhcXl+vyTxEZDVNAMqQna/XToKtJHUP+dvX6Nb6I Ywi+FS0FLFQCauI47PIjfK5BlifWMfzVtLknXEVlM0h7xJtqvhm6omXDBtIODWi1 y9a46+XJ4ZkPyMufprO/UMTv5JlPcTjU7uR02LtjHVspxKjrC7rkt5ATJ9avb148 vyX3ODbTb8jUbT/BMbvvA3TUR9NyqooE1F1ghyqGOR72SHamKx5eEhe3p/MBayxU 5cRvtWP9bSYOVVF7v1OXif4Nj8MzA9XyI1PckBGIw13qHdy7sWahKsjGe01B3cAe 6TO+4VvM1tf2sN/Bc4ko4D22JHUsz85ylVSG9WlEKWGlqcX3GRzLWr0JQFunPA0X L25iJffm =neKL -----END PGP SIGNATURE----- --q26j2+AERjcPSnRO--