All of lore.kernel.org
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 06/16] linux/time.h: include vsprintf.h
Date: Wed, 27 Nov 2019 10:27:07 +0900	[thread overview]
Message-ID: <20191127012706.GI22427@linaro.org> (raw)
In-Reply-To: <c4a874b0-f043-059f-4902-682653eb6cdc@gmx.de>

Heinrich,

On Tue, Nov 26, 2019 at 08:31:18AM +0100, Heinrich Schuchardt wrote:
> On 11/26/19 4:56 AM, Heinrich Schuchardt wrote:
> >On 11/13/19 1:44 AM, AKASHI Takahiro wrote:
> >>Without this commit, time.h possibly causes a build error as
> >>asctime_r() uses sprintf().
> >
> >asctime_r() is not a Linux symbol (as of next-20191119)

I simply don't get your point here.

> >
> >ctime_r() and asctime_r() are defined as inline functions. ctime_r() is
> >used in multiple places and so we may end up duplicating code. So I
> >would prefer the inline functions in time.h to be moved to a separate C
> >file in lib/.

Basically I'm reluctant to do so.
I have never touched ctime_r() nor asctime_r() as they were introduced
by Wolfgang in 2002. Since then, nobody complained. So why now?

> >Best regards
> >
> >Heinrich
> 
> Could it be that in one of your C files you simply didn't follow the
> U-Boot coding style convention to include common.h first

I will address this issue in general in the future.

> and we don't
> need this patch at all?

I commented against this above.
I believe that *hidden* dependency of include files should not be
exposed to users. In this case, for example, any code that uses
asctime_r() should not be bothered with such a dependency as
the code doesn't know what functions asctime_r() internally uses
or even if that function is inline or not.
I also mentioned this in another thread in different words:
https://lists.denx.de/pipermail/u-boot/2019-November/391959.html

Thanks,
-Takahiro Akashi

> https://www.denx.de/wiki/U-Boot/CodingStyle#Include_files
> 
> Best regards
> 
> Heinrich

  reply	other threads:[~2019-11-27  1:27 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13  0:44 [U-Boot] [PATCH v3 00/16] import x509/pkcs7 parsers from linux AKASHI Takahiro
2019-11-13  0:44 ` [U-Boot] [PATCH v3 01/16] linux_compat: move kmemdup() from ubifs.c to linux_compat.c AKASHI Takahiro
2019-11-26  3:20   ` Heinrich Schuchardt
2019-12-06 21:48   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 02/16] rtc.h: add struct udevice declaration AKASHI Takahiro
2019-12-06 21:48   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 03/16] rtc: move date.c from drivers/rtc/ to lib/ AKASHI Takahiro
2019-12-06 21:48   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 04/16] lib: add mktime64() for linux compatibility AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 05/16] include: kernel.h: include printk.h AKASHI Takahiro
2019-11-26  3:35   ` Heinrich Schuchardt
2019-11-27  1:02     ` AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-12-09  1:21     ` AKASHI Takahiro
2019-11-13  0:44 ` [U-Boot] [PATCH v3 06/16] linux/time.h: include vsprintf.h AKASHI Takahiro
2019-11-26  3:56   ` Heinrich Schuchardt
2019-11-26  7:31     ` Heinrich Schuchardt
2019-11-27  1:27       ` AKASHI Takahiro [this message]
2019-12-06 21:49   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 07/16] cmd: add asn1_compiler AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 08/16] Makefile: add build script for asn1 parsers AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 09/16] lib: add asn1 decoder AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 10/16] doc: add README for asn1 compiler and decoder AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 11/16] lib: add oid registry utility AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 12/16] lib: crypto: add public key utility AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-11-13  0:44 ` [U-Boot] [PATCH v3 13/16] lib: crypto: add rsa public key parser AKASHI Takahiro
2019-12-06 21:49   ` Tom Rini
2019-11-13  0:45 ` [U-Boot] [PATCH v3 14/16] lib: crypto: add x509 parser AKASHI Takahiro
2019-12-06 21:50   ` Tom Rini
2019-12-07 20:51     ` Heinrich Schuchardt
2019-12-07 22:34       ` Tom Rini
2019-12-09  0:59         ` AKASHI Takahiro
2019-11-13  0:45 ` [U-Boot] [PATCH v3 15/16] lib: crypto: add pkcs7 message parser AKASHI Takahiro
2019-12-06 21:50   ` Tom Rini
2019-11-13  0:45 ` [U-Boot] [PATCH v3 16/16] test: add asn1 unit test AKASHI Takahiro
2019-12-06 21:50   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191127012706.GI22427@linaro.org \
    --to=takahiro.akashi@linaro.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.