All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mason <slash.tmp@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] linux-fusion: fix several build issues
Date: Tue, 12 Jan 2016 23:20:29 +0100	[thread overview]
Message-ID: <56957C2D.4060901@free.fr> (raw)
In-Reply-To: <20160112174251.7280fdf3@free-electrons.com>

On 12/01/2016 17:42, Thomas Petazzoni wrote:

> We need your real name here to accept your patches. See
> http://lxr.free-electrons.com/source/Documentation/SubmittingPatches#L448.

Do you mean my full name, not just my first name?

> Please generate the patches with 'git format-patch -N' so that we don't
> have numbered patches.

OK.

> We also need a SoB line inside the patches.

OK.

> Can you try instead to replace '%ld' by '%tu'. Apparently, according to
> lib/vsprintf.c, %t is the proper format specifier for ptrdiff_t.

Erf, I had missed that, as the documentation isn't up-to-date.
https://www.kernel.org/doc/Documentation/printk-formats.txt

However, if I do use a specific kernel feature, the module
will no longer build for earlier kernels, while a cast
works "everywhere".

I tried tracing the history of the %t spec in printk.
I found 4370aa4aa753 (dated 2009-03-06) i.e. since 2.6.30

What do you think?

>> +-#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) || defined(CONFIG_TINY_RCU) || defined(rcu_read_lock)
>> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) || defined(rcu_read_lock)
> 
> Are you sure it is good to keep the defined(rcu_read_lock) test ? This
> only works if rcu_read_lock is a macro, not if it's an inline function.
> If tasklisk_lock is available up to 2.6.18, then why not simply keep
> the version-based condition?

AFAICT, the rcu_read_lock macro was introduced in the 2.5 dev cycle.
bc33f24bdca8 changed rcu_read_lock from a macro to an inline function
since 2.6.32

It's possible e.g. kernel 2.6.16 (one of the first LTS kernels IIUC)
had both rcu_read_lock available, and tasklist_lock exported.

On the other hand, if both methods are available, I'm not sure which
was better. Do you have a strong opinion on the subject?

Thanks for the review.

Regards.

  reply	other threads:[~2016-01-12 22:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12 15:09 [Buildroot] [PATCH] linux-fusion: fix several build issues Mason
2016-01-12 16:42 ` Thomas Petazzoni
2016-01-12 22:20   ` Mason [this message]
2016-01-13  8:23     ` Thomas Petazzoni
2016-01-15 16:12       ` [Buildroot] [PATCH v2] " Mason
2016-01-16 13:04         ` Thomas Petazzoni

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=56957C2D.4060901@free.fr \
    --to=slash.tmp@free.fr \
    --cc=buildroot@busybox.net \
    /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.