From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752594AbcGNUyw (ORCPT ); Thu, 14 Jul 2016 16:54:52 -0400 Received: from nm5-vm0.bullet.mail.bf1.yahoo.com ([98.139.213.150]:52408 "EHLO nm5-vm0.bullet.mail.bf1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752317AbcGNUys (ORCPT ); Thu, 14 Jul 2016 16:54:48 -0400 X-Yahoo-Newman-Id: 67933.20774.bm@smtp211.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: t4kLFvwVM1nmvEOwAGTRvXmPEa2T9ZH22njNKjQ7HON6C.M H8lEH2MawRCa_fCD57s0ewHIkKrwt7eQ9Z3Ne_w8F15x1p1y6gDO0gWi0puN VZo8Bqhk6h.gI2tDk0guOvJxmET44ETKjfftx2WzdSjepcZjY7R7MofD7ecm H1_7Rp32BFXuMfGZZH816w.Cg6RhOMeFyk8RNeh4YY_2K_mS0ijCja0LXPuy Ppr_kID1mRIG6oB8r8N2Kh8USml0QD0iVsDWMOdHYBma5mqJcYb7PDcLtQWH e1cX85jVLvnkPscC.Op_vzVJ8xys_HY3Em0sNSytfNySg5KNfzvIn2HfCLdT of8aOzFTur6v9GcfbIJWDU0fVXumlKi9utEghCRs0mNqagq2v1KNzQr0GMpi Q_iZRUWeEoN4e5Pc3wKEiAzaLFAUZ7x2YQdDOXfpA9s0F9ZXPZ4YpRcYpCZQ UqoOby8TmzyLZSbCSQdEMmNPsCOLil19Ywuu8jSf7OjgkvKU3gDoO0wPH4gK rFChETcLgm8cisbuo9cb_eyS11J9gPTX_oIxXkorlJERjradJZMFk1039aqT jIHgf36hGOTAp X-Yahoo-SMTP: OIJXglSswBDfgLtXluJ6wiAYv6_cnw-- Subject: Re: [PATCH] security: Use IS_ENABLED() instead of checking for built-in or module To: Paul Moore , Javier Martinez Canillas References: <1468512050-26272-1-git-send-email-javier@osg.samsung.com> <3f0053fa-8824-f86f-e04f-16ad1204abc7@osg.samsung.com> <37a0011d-b32f-d24b-3771-f6eb6cae5342@schaufler-ca.com> Cc: linux-kernel@vger.kernel.org, "Serge E. Hallyn" , linux-security-module@vger.kernel.org, Stephen Smalley , Eric Paris , selinux@tycho.nsa.gov, James Morris From: Casey Schaufler Message-ID: <4722982b-1541-20f4-c256-68a93dff7cf9@schaufler-ca.com> Date: Thu, 14 Jul 2016 13:54:48 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/14/2016 12:57 PM, Paul Moore wrote: > On Thu, Jul 14, 2016 at 12:30 PM, Casey Schaufler > wrote: >> On 7/14/2016 9:20 AM, Javier Martinez Canillas wrote: >>> Hello Casey, >>> >>> On 07/14/2016 12:17 PM, Casey Schaufler wrote: >>>> On 7/14/2016 9:00 AM, Javier Martinez Canillas wrote: >>>>> The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either >>>>> built-in or as a module, use that macro instead of open coding the same. >>>> Why? >>> Why not? We have a macro for this so why is better to open coding it? >> Unless there is a real advantage to IS_ENABLED() over ifdef there >> is no value in making the change. Any change can introduce a problem, >> so we don't make changes based on "why not". It's called code churn. > I think the IS_ENABLED() macro makes the code more readable by helping > abstract away some of the Kconfig/module details; not to mention it > provides some insulation from Kconfig changes (although I suppose it > is doubtful this will be a real issue anytime soon). > > Javier, if you want to respin this patch without the Smack changes > I'll merge it into the SELinux tree (not for the v4.8 merge window, > but for the next merge window). However, if Casey changes his mind > and ACKs this patch, I'll go ahead and merge the original patch. Don't let me stand in the way. If you think it's worth doing go ahead and add my ACK.