Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4891339ybe; Mon, 9 Sep 2019 16:47:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwuhvlp69V7m3RniGyT/bNhSTngg3VDhab9kWxImpXPiqEGv3sMWWKON4I/R+YJnYB8gaFq X-Received: by 2002:a17:907:10c2:: with SMTP id rv2mr21195923ejb.305.1568072830521; Mon, 09 Sep 2019 16:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568072830; cv=none; d=google.com; s=arc-20160816; b=wdbm+iY2CQLDbu4MphGmsv++ZDDBcFzsLd+aom8q7nOXd7oMFZpnInIMdtdSxw1Wo5 RWKSlDpFaumRDr0+Y0xBpaetQgBrYY6EDp6SnOhFujLowo/TMOCsSq1aIQGtyTEzOeEj IS+pM9/Auwmd6lp/wt8JoXNY1JvAErXTuQinrTpvStQjlrXrZBEpbjyg/awOt7Zo+Ko4 Tvv6IeGJ3qgWbB+UTV7hRDTIJV2IDnPRIuQbsT0Rx9U7N0R2C2rD58p3/KzBNg8XZkul aDZtPi9m33xyl65A0XEUvMGWKzIGrYiSFNnyQ6bfMUtsiJRC+FLSxSTHCydKbJzhmeF2 ZESA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=OT0rnJF7dq+ePoqnTB+VvCbR+w2qZCS92xCRxsoGZeM=; b=WtInryeoBTWYm922wSppZK6M7MBID7sAdEQNWh+/olVJ0yCijA2zNc1dtcDLs52fz+ buxdvrdffYGMEBEd0tCX8nDFiQINRBNfS7b2EnmGi80ZQ1rOmIOgYcas7EH9jFnQxCBG CjxcC6RHYQRlEjd17Xsv3564GXuWLg9BJd37xiMb8jIPX6YJgPcg/mAgbAvIqSTqZybx spjFj7HCd44D8ffJ4ZuU3Xhb1e/tiZzfQ894mFKzVLhpfFfkycjC3wDTSXMM9wBl4Ndt BoRwt+IjiYuoF5q0A2ZqFrj6zM6UH8R8VoyE7ikipsg53AAKqak+KLIKBgqy7lUDvj5o 0UKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=CE+ErZ08; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p32si10673755edc.259.2019.09.09.16.46.46; Mon, 09 Sep 2019 16:47:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=CE+ErZ08; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404173AbfIILjX (ORCPT + 99 others); Mon, 9 Sep 2019 07:39:23 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:20811 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404163AbfIILjX (ORCPT ); Mon, 9 Sep 2019 07:39:23 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id x89BdDLv014382; Mon, 9 Sep 2019 20:39:13 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x89BdDLv014382 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1568029153; bh=OT0rnJF7dq+ePoqnTB+VvCbR+w2qZCS92xCRxsoGZeM=; h=From:To:Cc:Subject:Date:From; b=CE+ErZ08u+H/63niCo518H1RrRIMPHzxKVtsaOhSeBwqAtFm9YeoXOekM5pfjgk1b aIrJyDEXbknTlSH0+dhr57MFJGiqDCSL+JXO6mMdvTl8SpANyIDmaVxixoPsielUvp LGxM5xrcsDAb0cd4joZkIXNYtBJnDfPIJ6hqEAFX0quzwIJBNsZb2D27XtrnvSdTgs BrFARt5ugIEx5pCRGp+xW4hma0VNACQRVHsYxKpnm29l7bY3EI0kpUp4PEg42pPysR TI3Kr1bOrmIu6fJOvOe069UeYv1hXaYL7IfBmQsQH5WNhkpFqezDBowo1LElJ9EB+H MC5qEzaZfLYSA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Jessica Yu Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH] module: remove unneeded casts in cmp_name() Date: Mon, 9 Sep 2019 20:39:02 +0900 Message-Id: <20190909113902.3096-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org You can pass opaque pointers directly. I also renamed 'va' and 'vb' into more meaningful arguments. Signed-off-by: Masahiro Yamada --- kernel/module.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel/module.c b/kernel/module.c index 62e49ead0237..a2db612d039e 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -544,12 +544,9 @@ static const char *kernel_symbol_name(const struct kernel_symbol *sym) #endif } -static int cmp_name(const void *va, const void *vb) +static int cmp_name(const void *name, const void *sym) { - const char *a; - const struct kernel_symbol *b; - a = va; b = vb; - return strcmp(a, kernel_symbol_name(b)); + return strcmp(name, kernel_symbol_name(sym)); } static bool find_exported_symbol_in_section(const struct symsearch *syms, -- 2.17.1