Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1330279rwd; Wed, 7 Jun 2023 14:43:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5rkWVdk423unaORsiaoXYRTEeSgIHXqYeyX+fSKV+At32rQhxp9xF9Zt/h0JL5DtOc4EFI X-Received: by 2002:a05:6a20:7d87:b0:10e:d4fb:b034 with SMTP id v7-20020a056a207d8700b0010ed4fbb034mr2265158pzj.28.1686174197953; Wed, 07 Jun 2023 14:43:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686174197; cv=none; d=google.com; s=arc-20160816; b=xCVMa+IPGZZBxtuQBUWsZauexqeGbaLtgFaxtHUe9fMsglyRoEMQHnd8p8yj5dWl8A wuHKJgcCVqEA4UMaKZj4EA27shJrwLzrLMdFTuo3xnNkQtkZ0Dbliyle8GL5oIh3+dpr PcGBcHca8gfXEPj3LEBRzOpvgxDNsTFteNX6UhqeeOeGwJNzlHcGsW2kCIn3iZSMYvBK 7fKp/PMKhpF7QIl0Kzd5UC68jOlZVvQjXZIrkbk+TUwHYbm53Ob9IPLGyj6lgqc3aRCJ Ec8ETUjEkHnzoI2d0GuNspU8QOxgLcEL/yb1Aq27swZu3miamVgNvfPF5vR+s7nF080Z 3WYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ag0Zb0tQVIKFhYpth7TyBzzfO6OzmNaWjp5H9Lmc/Y0=; b=EZl0CaOCyGQo4S0IF7zFCAANOnHQ8PyfqCHls2nP+5Fc1Uubv1L98Had2fJYRM0xq6 BFiieMg93L/OCfmGiUL7mCt27Vf0SUTXsJ2/LYQHZlFi5rGmc2RUS9Y7jWo+R4/Uo0NE z0LJ5sEPd+5pOiryetDT37Cq8kdmL/xRQcrswkU7lziAI7JQD+7lUb+j9FXtK+aF57yi oy9haQpWnWRIJ8mPEOnHDDFesBtyc9NM+rKdx/AoiCBO8bx2vH5Z3xVAVl+H3EdbgBZB QbaM39G8eHywQATG2IaYrwvv1R/c87fG14IRsZNgH1GXBNjU3OxtJ3ru9EQFddKcNuXi XfMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=WW+HEszC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 23-20020a630017000000b0052ca7192647si9569695pga.548.2023.06.07.14.43.04; Wed, 07 Jun 2023 14:43:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=WW+HEszC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232616AbjFGUTR (ORCPT + 99 others); Wed, 7 Jun 2023 16:19:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232689AbjFGUTF (ORCPT ); Wed, 7 Jun 2023 16:19:05 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A1F126A3 for ; Wed, 7 Jun 2023 13:18:32 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-516a0105121so171904a12.0 for ; Wed, 07 Jun 2023 13:18:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686169111; x=1688761111; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ag0Zb0tQVIKFhYpth7TyBzzfO6OzmNaWjp5H9Lmc/Y0=; b=WW+HEszCeEXzYQpeXWWFQloQNhynhfuERyLc2J7luikQlFtPf0pA6kTvxcOPI1xQCy m+USe2Urj4bpEGg+/xGiOCmggDf0yK8+gnu+7VVUoG5QVeHqeJbGX+E2jTtmRqk+J/QS ggksPtASg//2NNylsky8RMD7JlZ6TaXVFmwGJoIeBbmegoFwiUqCiUpeTVAWhta+pqOp S9xh3CkQLS3vs5B2ccmoqkJBHWZhYDXDa2Z35MlluN044/oiJ/Ju5RrtnPjIaS+vQ58x hG99u4+wmOR57VU3GOWvoFmG2FEz9djdKn8n58HDWx1xAslqBjoRsKqtG4eUFe7RsNDh 54WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686169111; x=1688761111; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ag0Zb0tQVIKFhYpth7TyBzzfO6OzmNaWjp5H9Lmc/Y0=; b=cyhkRM/uC7a4OHSycYIpttpWSWb4ZTynquemyWJtWRsBqIxWJRXlErZSuWaM1dK6FS KZPayvbkaUuhX7iIj6kQGuXDshPrki2y9QIte3TAnr1dbhgSx8ihFcTaiVev7mL4QEMX flqe++Fx7OqqxYGURTvz8qJz014MBZAPgxBIQ4eBvwnoRkLlYjJ0iK7pH7JmEUHxYWuw YaiuNirn1fNHjniKamWKgBl/vc4LFDMw8Ir172/Fo+jEcev058J8rEXsXJcv1F/eWBMh MApDQ+4v7NjU/qTVV7gjcu/yJs9VU3+7BKkWZzRWRBG+HWV00BTUimLAcjiNwvAw2Ptu 60Mw== X-Gm-Message-State: AC+VfDyjwQwA7RzPugsjbaU41/o8RKJmjH1+oPfC7rzFzCbe/6TR0B1n FMbxO9MfeSeYtWGYKg7EeW0= X-Received: by 2002:a05:6402:26c7:b0:506:6c2a:528f with SMTP id x7-20020a05640226c700b005066c2a528fmr2857967edd.4.1686169110639; Wed, 07 Jun 2023 13:18:30 -0700 (PDT) Received: from [192.168.0.101] (p57ba2e0b.dip0.t-ipconnect.de. [87.186.46.11]) by smtp.gmail.com with ESMTPSA id f21-20020a05640214d500b00514b8d5eb29sm6471685edx.43.2023.06.07.13.18.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Jun 2023 13:18:29 -0700 (PDT) Message-ID: <90813181-02a1-b54f-132b-c68e7b797bb6@gmail.com> Date: Wed, 7 Jun 2023 22:18:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v2 1/5] staging: rtl8192e: Remove variable SetWirelessMode To: Dan Carpenter , Yogesh Hegde Cc: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org References: <01a162c5-f0de-47b1-97e7-8a451a89df80@kadam.mountain> Content-Language: en-US From: Philipp Hortmann In-Reply-To: <01a162c5-f0de-47b1-97e7-8a451a89df80@kadam.mountain> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/7/23 17:07, Dan Carpenter wrote: > On Wed, Jun 07, 2023 at 08:31:41PM +0530, Yogesh Hegde wrote: >> The variable SetWirelessMode is set in only one place throughout the >> driver. This patch removes the variable and calls the real function >> directly instead, eliminating the unnecessary indirection. >> Additionally, the removal of the variable aligns with the checkpatch >> guidelines by removing the use of CamelCase. >> >> Signed-off-by: Yogesh Hegde >> --- >> >> v2: Removed the variable and called the function direction instead of >> just renaming the variable as suggested by Greg Kroah-Hartman >> . > > Reviewed-by: Dan Carpenter > > regards, > dan carpenter > > Hi Dan, thanks for all the work you do. I always appreciate your comments. But I think it does not work because this driver is divided into two modules. To load the driver I am using the following lines: sudo insmod drivers/staging/rtl8192e/rtllib.ko sudo insmod drivers/staging/rtl8192e/rtl8192e/r8192e_pci.ko So this line is required: priv->rtllib->SetWirelessMode = rtl92e_set_wireless_mode; as one name is used in one module and one in the other module. But the change was proposed by the masters so I thought that I must be wrong. My compiler does not compile this patch: LD [M] drivers/staging/rtl8192e/rtl8192e/r8192e_pci.o MODPOST drivers/staging/rtl8192e/Module.symvers ERROR: modpost: "rtl92e_set_wireless_mode" [drivers/staging/rtl8192e/rtllib.ko] undefined! make[1]: *** [scripts/Makefile.modpost:136: drivers/staging/rtl8192e/Module.symvers] Error 1 make: *** [Makefile:1978: modpost] Error 2 Did this compile on your system Yogesh? So I am looking forward to your response what I am doing wrong. Bye Philipp