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 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 76F17C433EF for ; Fri, 28 Jan 2022 15:21:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6216582BA6; Fri, 28 Jan 2022 16:21:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (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="WzTiYmWE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F05EA837C9; Fri, 28 Jan 2022 16:21:42 +0100 (CET) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (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 D1B4682014 for ; Fri, 28 Jan 2022 16:21:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72c.google.com with SMTP id b22so5765565qkk.12 for ; Fri, 28 Jan 2022 07:21:39 -0800 (PST) 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=hmpqKJjaavx7g9BrQm33tFZyjLyfc0LWMhKpIXDMoG4=; b=WzTiYmWEjITZXaNfrcgfkxHXkuswR5FV0mcOEDaYy/O/6sK8HoxCy5daDa21TXeUwJ 3nFauuzzuZystF0O0hc8myXTDr3rnmF4Ieb1VhvUss9W5X0ioUBjDkRrB90zQeCLpLbS D7jECEIHt2NEgzxO5Qmnlg45D9Kcju4dzz+M8= 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=hmpqKJjaavx7g9BrQm33tFZyjLyfc0LWMhKpIXDMoG4=; b=ClyrzKTuwPMT6grFSc0qpysCEW1CFDbNatJWNcH9QlJ93MNimsHTf7ttufKGQIGjaE ZwuExYt/my540w7yWBVJFVvYBepTuQZcsw2bn96MF7o59DORklGBVkZjrn/EQx5siugC w4yXUjqkJVy27WnKOuqhZy9i3NPycSmTbs5yDw2ahjOb7w/PZn1KBKrR1E50emz9D3XE 0CQy4oee8YWHUY1p+MVDyab7uZ8xmnG51zKE1XyViY2wBWA6ioEBDGmZFPxgZl3d8146 iKeSx+ocBmO+Z4DFxjozesRCDMPdniVAupgw4pzclciG0tUaaOLegEYLYr1A0U8yTiXP 4WgQ== X-Gm-Message-State: AOAM531BYZEB6IF1JgcZmRGtKnNexBYIjtbrSDTpSyGm7m4L86EdP1mb 8ewI59BB6T8QxfLu66JYvAjk1Q== X-Google-Smtp-Source: ABdhPJz0ukOBcB1x9IWeHwKVDra2ajOFIXUQjV9IZJbHd4pZWhZW1dDCKk10ug6/LvqHVsa+JZ35oA== X-Received: by 2002:a05:620a:4408:: with SMTP id v8mr6114578qkp.376.1643383298658; Fri, 28 Jan 2022 07:21:38 -0800 (PST) Received: from bill-the-cat (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id r14sm3772890qkp.85.2022.01.28.07.21.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jan 2022 07:21:38 -0800 (PST) Date: Fri, 28 Jan 2022 10:21:36 -0500 From: Tom Rini To: Frieder Schrempf Cc: Lukasz Majewski , u-boot@lists.denx.de, Heiko Thiery , Michael Walle , Frieder Schrempf , AKASHI Takahiro , Aswath Govindraju , Jaehoon Chung , Marek Szyprowski , Oleksandr Suvorov , Patrice Chotard , Patrick Delaunay Subject: Re: [PATCH 1/3] dfu: use pointer to pass length to dfu_write() Message-ID: <20220128152136.GA3547581@bill-the-cat> References: <20210930162208.2749155-1-frieder@fris.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="liOOAslEiF7prFVr" Content-Disposition: inline In-Reply-To: <20210930162208.2749155-1-frieder@fris.de> 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.5 at phobos.denx.de X-Virus-Status: Clean --liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 30, 2021 at 06:22:06PM +0200, Frieder Schrempf wrote: > From: Frieder Schrempf >=20 > This doesn't include any functional changes, but allows us to use the > size parameter to report the actual written bytes back to the caller. >=20 > This is useful in cases of unaligned writes to serial flash where the > first write covers only a part of the buffer (until the next sector > boundary) and the remaining bytes need to be written in a further call > to dfu_write(). >=20 > While at it, we also adjust the data type of the 'write' and 'left' > variable in dfu_write_from_mem_addr() to match the values passed. >=20 > Signed-off-by: Frieder Schrempf This causes: aarch64: + qemu_arm64 +(qemu_arm64) In file included from include/linux/bitops.h:22, +(qemu_arm64) from include/log.h:15, +(qemu_arm64) from include/linux/printk.h:4, +(qemu_arm64) from include/common.h:20, +(qemu_arm64) from drivers/dfu/dfu.c:9: +(qemu_arm64) drivers/dfu/dfu.c: In function 'dfu_write_from_mem_addr': +(qemu_arm64) include/linux/kernel.h:184:24: error: comparison of distinct = pointer types lacks a cast [-Werror] +(qemu_arm64) 184 | (void) (&_min1 =3D=3D &_min2); \ +(qemu_arm64) | ^~ +(qemu_arm64) drivers/dfu/dfu.c:748:25: note: in expansion of macro 'min' +(qemu_arm64) 748 | write =3D min(dfu_buf_size, left); +(qemu_arm64) | ^~~ +(qemu_arm64) In file included from include/linux/printk.h:4, +(qemu_arm64) drivers/dfu/dfu.c:750:23: error: format '%lu' expects argumen= t of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Wer= ror=3Dformat=3D] +(qemu_arm64) 750 | debug("%s: dp: 0x%p left: %lu write: = %u\n", __func__, +(qemu_arm64) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~ +(qemu_arm64) include/log.h:163:21: note: in definition of macro 'pr_fmt' +(qemu_arm64) 163 | #define pr_fmt(fmt) fmt +(qemu_arm64) | ^~~ +(qemu_arm64) include/log.h:283:9: note: in expansion of macro 'debug_cond' +(qemu_arm64) 283 | debug_cond(_DEBUG, fmt, ##args) +(qemu_arm64) | ^~~~~~~~~~ +(qemu_arm64) drivers/dfu/dfu.c:750:17: note: in expansion of macro 'debug' +(qemu_arm64) | ^~~~~ +(qemu_arm64) drivers/dfu/dfu.c:750:45: note: format string is defined here +(qemu_arm64) | ~~^ +(qemu_arm64) | | +(qemu_arm64) | long unsi= gned int +(qemu_arm64) | %u +(qemu_arm64) cc1: all warnings being treated as errors +(qemu_arm64) make[3]: *** [scripts/Makefile.build:253: drivers/dfu/dfu.o] = Error 1 +(qemu_arm64) make[2]: *** [scripts/Makefile.build:394: drivers/dfu] Error 2 +(qemu_arm64) make[1]: *** [Makefile:1889: drivers] Error 2 +(qemu_arm64) make: *** [Makefile:177: sub-make] Error 2 Please rework and repost, thanks! --=20 Tom --liOOAslEiF7prFVr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmH0CfkACgkQFHw5/5Y0 tyw52wv+PXAoMdO9XjfaUd61d5OuLRg0yvhJDxdA+w0QfRIIO4gO4CEwIuKK2F4d m6QNpP5JBwtEFsv/cHz+1aL6QgOKAq0gulIMAaB7hw63UTVEqCwCz8G+kuFzIIyh EiBdZamelV5yRIJmfm62v8/jdfg4NlcAijBdlo8z32JWnZi5vAIeo9B11ZoRL7Cx /KmRaoziSAz1kKg/O9b6lgEI9jkilP0NeEv6wyT48fRjgblXP212M0XYxh/Dw1Ki 2sdjGgEwxVacaaXuCw0xIJ9DdXYAaRpO8hkKW7/tzSK5d0s/eNHMD02lFAa5R3xT q1+vmhLZLpM1ooMpltjGtwIl/dxkMItgoBMKlIsN27Hh4EBFZ1bk9gLBgALmPRh2 fqopcLnnhQstghia7HQ0xDoJAHowte8xQcFmTaIxoynwCPFTjRKEiz/xisbHE6yW 4iAmechxnIZ9q1MeA0+Foh90ZSaEDtMzVLLXOkpw88X8Vq2Kc+/l0TxfjclX28Cv 0CAkaIWw =spfZ -----END PGP SIGNATURE----- --liOOAslEiF7prFVr--