All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Ashutosh Dixit <ashutosh.dixit@intel.com>,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Peter Foley <pefoley2@pefoley.com>
Cc: Sudeep Dutt <sudeep.dutt@intel.com>,
	Nikhil Rao <nikhil.rao@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH linux-next] Documentation: mic: mpssd: Disable mpssd builds for kernels < 3.13
Date: Tue, 23 Sep 2014 14:46:10 -0700	[thread overview]
Message-ID: <5421EA22.6000206@infradead.org> (raw)
In-Reply-To: <c6aff784285e77771ad4edd3d451d95529bfb17d.1411496575.git.ashutosh.dixit@intel.com>

On 09/23/14 14:55, Ashutosh Dixit wrote:
> mpssd depends on headers available in kernels >= 3.13. Therefore
> disable the build for kernels < 3.13. For kernels < 3.13, to avoid the
> appearance of a build break simply print an error message and exit.

Why is this needed?  This file won't be built in any automated build
in v3.13 or any kernel until v3.17 at the earliest?


> Reported-by: Andrew Morton <akpm@linux-foundation.org>
> Cc: Randy Dunlap <rdunlap@infradead.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Peter Foley <pefoley2@pefoley.com>
> Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com>
> Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  Documentation/mic/mpssd/mpssd.c | 15 +++++++++++++++
>  Documentation/mic/mpssd/sysfs.c |  5 +++++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c
> index 3c5c379..2cc48cc 100644
> --- a/Documentation/mic/mpssd/mpssd.c
> +++ b/Documentation/mic/mpssd/mpssd.c
> @@ -18,6 +18,10 @@
>   * Intel MIC User Space Tools.
>   */
>  
> +#include <linux/version.h>
> +
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
> +
>  #define _GNU_SOURCE
>  
>  #include <stdlib.h>
> @@ -1726,3 +1730,14 @@ main(int argc, char *argv[])
>  
>  	exit(0);
>  }
> +#else /* kernel version < 3.13 */
> +
> +#include <stdio.h>
> +#include <stdlib.h>
> +
> +int main(void)
> +{
> +	fprintf(stderr, "mpssd is only usable against kernels >= 3.13\n");
> +	exit(1);
> +}
> +#endif
> diff --git a/Documentation/mic/mpssd/sysfs.c b/Documentation/mic/mpssd/sysfs.c
> index 8dd3269..1e3ff75 100644
> --- a/Documentation/mic/mpssd/sysfs.c
> +++ b/Documentation/mic/mpssd/sysfs.c
> @@ -18,6 +18,10 @@
>   * Intel MIC User Space Tools.
>   */
>  
> +#include <linux/version.h>
> +
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
> +
>  #include "mpssd.h"
>  
>  #define PAGE_SIZE 4096
> @@ -100,3 +104,4 @@ done:
>  		free(oldvalue);
>  	return ret;
>  }
> +#endif
> 


-- 
~Randy

  reply	other threads:[~2014-09-23 21:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-23 21:55 [PATCH linux-next] Documentation: mic: mpssd: Disable mpssd builds for kernels < 3.13 Ashutosh Dixit
2014-09-23 21:46 ` Randy Dunlap [this message]
2014-09-23 22:59   ` ashutosh dixit
2014-09-23 23:23     ` Peter Foley
2014-09-23 23:38       ` Andrew Morton
2014-09-23 23:47         ` Peter Foley
2014-09-24  0:51           ` Andrew Morton
2014-09-24  0:58             ` Peter Foley
2014-09-24  4:51               ` ashutosh dixit
2014-09-24  4:59                 ` Andrew Morton
2014-09-24  5:20                   ` ashutosh dixit
2014-09-23 21:59 ` Peter Foley

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=5421EA22.6000206@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=ashutosh.dixit@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikhil.rao@intel.com \
    --cc=pefoley2@pefoley.com \
    --cc=sudeep.dutt@intel.com \
    /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.