Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751512AbdGRIvr (ORCPT ); Tue, 18 Jul 2017 04:51:47 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:32785 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751407AbdGRIvm (ORCPT ); Tue, 18 Jul 2017 04:51:42 -0400 MIME-Version: 1.0 In-Reply-To: <5071655.YFHJQhx4QD@positron.chronox.de> References: <3910055.ntkqcq1Chb@positron.chronox.de> <5071655.YFHJQhx4QD@positron.chronox.de> From: Arnd Bergmann Date: Tue, 18 Jul 2017 10:51:41 +0200 X-Google-Sender-Auth: SeIMjIZKnlHLsdww-AbcsA6X1Ac Message-ID: Subject: Re: [RFC PATCH v12 4/4] LRNG - enable compile To: =?UTF-8?Q?Stephan_M=C3=BCller?= Cc: "Jason A. Donenfeld" , Greg Kroah-Hartman , linux-crypto@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v6I8prtg019462 Content-Length: 885 Lines: 31 On Tue, Jul 18, 2017 at 9:59 AM, Stephan Müller wrote: > Add LRNG compilation support. > > diff --git a/drivers/char/Makefile b/drivers/char/Makefile > index 53e3372..87e06ec 100644 > --- a/drivers/char/Makefile > +++ b/drivers/char/Makefile > @@ -2,7 +2,15 @@ > # Makefile for the kernel character device drivers. > # > > -obj-y += mem.o random.o > +obj-y += mem.o > + > +ifeq ($(CONFIG_LRNG),y) > + obj-$(CONFIG_LRNG) += lrng.o > + lrng-y += lrng_base.o lrng_chacha20.o > +else > + obj-y += random.o > +endif I think you can write the same in a more readable way without the intermediate object: ifdef CONFIG_LRNG obj-y += lrng_base.o lrng_chacha20.o else obj-y += random.o endif Arnd