From patchwork Wed Feb 10 05:08:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 8268461 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 02C17BEEE5 for ; Wed, 10 Feb 2016 05:09:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3499E202B8 for ; Wed, 10 Feb 2016 05:09:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C4E220270 for ; Wed, 10 Feb 2016 05:09:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752965AbcBJFJJ (ORCPT ); Wed, 10 Feb 2016 00:09:09 -0500 Received: from relais.videotron.ca ([24.201.245.36]:21848 "EHLO relais.videotron.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751456AbcBJFIj (ORCPT ); Wed, 10 Feb 2016 00:08:39 -0500 Content-transfer-encoding: 7BIT Received: from yoda.home ([96.23.157.65]) by VL-VM-MR001.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0O2B001LQFMB3D00@VL-VM-MR001.ip.videotron.ca>; Wed, 10 Feb 2016 00:08:35 -0500 (EST) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id A9E882DA0588; Wed, 10 Feb 2016 00:08:35 -0500 (EST) From: Nicolas Pitre To: Michal Marek , linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Al Viro , Rusty Russell Subject: [PATCH v2 3/6] fixdep: minor cleanup Date: Wed, 10 Feb 2016 00:08:25 -0500 Message-id: <1455080908-22272-4-git-send-email-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.5.0 In-reply-to: <1455080908-22272-1-git-send-email-nicolas.pitre@linaro.org> References: <1455080908-22272-1-git-send-email-nicolas.pitre@linaro.org> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Simple code reorganization to make coming changes more obvious. Signed-off-by: Nicolas Pitre Acked-by: Rusty Russell --- scripts/basic/fixdep.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 5b327c67a8..63f129021d 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -236,21 +236,20 @@ static void parse_config_file(const char *map, size_t len) continue; p += 7; for (q = p; q < map + len; q++) { - if (!(isalnum(*q) || *q == '_')) - goto found; + if (!(isalnum(*q) || *q == '_')) { + if (!memcmp(q - 7, "_MODULE", 7)) + q -= 7; + if (q - p > 0) + use_config(p, q - p); + break; + } } continue; - found: - if (!memcmp(q - 7, "_MODULE", 7)) - q -= 7; - if (q - p < 0) - continue; - use_config(p, q - p); } } -/* test is s ends in sub */ +/* test if s ends in sub */ static int strrcmp(const char *s, const char *sub) { int slen = strlen(s);