Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2172206pxb; Mon, 12 Apr 2021 16:51:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2ZJxzzj4XtcdkzW0gZvceyB4u7rvR22B6jFI2Yq3q8D9R6ZF/Q8WDhETPFJSvdQISgnbc X-Received: by 2002:a17:907:628a:: with SMTP id nd10mr29503211ejc.326.1618271479718; Mon, 12 Apr 2021 16:51:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618271479; cv=none; d=google.com; s=arc-20160816; b=n8b8Irp6ZdEVUX7P7i63e6iC9hx3E8+ehQcq/YuRKJrSCaJroz0v0h5TsPEH98Vgx8 Rjw92k+CpWRfwGstFRaZ9ISXGi6a3/aJYcfkyLMjc/ND0NIgnVyhWaVkwmdyAf60aSbd hD77COTYM13J5/0fn5HhuUS9iIe8Ra+GVddAI36FFpYuk0o0NslrX7Otms1x8A/vwIGU Ch9TZb/d5E8fei2BPc70ItrkaGWUT4tiRdHjdqAShqU4hwZE8qdk+Hxl8n5dIZjla2cP /ujO1OTCKcDpd28sfqRD2QhXOsgi7eZHraf3GZW75Ti/FPn7n0YICFEk30V9T24T5VIw 1/og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0jL6kS6yKwLQwJYSHVW/F2daax6+6XOr6VTQzmb6EBo=; b=ZgGl5WCBtsIVb1jAImpyMXJQGLkiGsFNNZZI2WBM7zgl3eZRu6nDREDMWFZupAmMoj /JOYk7r2/DGX7RePbRZ8SVLT3x6gckGa8rmC/IxrlsQnfNUL4udjZomkK2PoxBgRT+9w 3BntlWX1AQUNicWhpaBnomppzeXitYWyY3kBrnbpjvCQcUKgixbeLhxgLw+yJzuafffy JfvtJmO9K1ELygU+H6fmr5z06BOt02JDV3xz8gxQK7dWcopgwB3wCtQSYha03cgb/VMR oL/XpPKJ3oIXEQSmAGFN3QlymtaYGlU1xUp1JcVASDHty37s66hb0gT8h3zEJCkAp1X7 +o0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=grQwB2So; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qh17si8405119ejb.127.2021.04.12.16.50.55; Mon, 12 Apr 2021 16:51:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=grQwB2So; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S239507AbhDLKnM (ORCPT + 99 others); Mon, 12 Apr 2021 06:43:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239157AbhDLKnL (ORCPT ); Mon, 12 Apr 2021 06:43:11 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BE16C061574 for ; Mon, 12 Apr 2021 03:42:53 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id w23so14465952edx.7 for ; Mon, 12 Apr 2021 03:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0jL6kS6yKwLQwJYSHVW/F2daax6+6XOr6VTQzmb6EBo=; b=grQwB2SoiIeDwtYG2crFnvYSGLpshKob/rVzA9X42caOcKViYGNiv/RZqYiTcEMWRj XHE7Qx9ehqe/M3XyJSS4ZsNt5Vp7kxFhUlfScBvgAUQA4vZL6UwfVxNZwQLssswxDIwy 3/yZhymlZAFmuflzJ3YisVUe2FwLy0QO9NvPBR+iMLe255CV3olS8XxLXMnLKbMPPdnS /rxWIaj8MTdS3nBhMR7xUMMdEdMqVW/nIVLAXF7B3eMyeG//ZebPH8ssiObXzfMqeKsZ h5wSUTkFm6EbCP9/EAMuwku1rS9/iiEgug9oh9Q9+H21tHD26pN3y4VOOnI5W6y+Xyem /qCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0jL6kS6yKwLQwJYSHVW/F2daax6+6XOr6VTQzmb6EBo=; b=kHebMcUg2t7zmyWko0n+qXYiIVaBG7jconGI+EWZxQ/ssyKm29couDxEFDLGLAEx1q nzUR4V0AI49Wv2bzt/u/VW0MUc34Pr08ocNggzxOFQL5GV/Oa6tMkplJ7Ky4TADlCps1 rLG3jlM+90WLjMw+qghrbyInU8nXeOsQeL+QqqtHHMZta7SN7HZgQ2uhOxHwNVDscqF5 1EurDB173J67nYAR8udMJVIO9NcOAILlPO7YsMgvsiBVg9ky55PZgBBJIMOdNXljLj46 MQQN1EV56Of9qgiMyKKYKidgsXTfJWiz81Cnyzrx+lPdpO5KeN+WGXffNZdX3yhgrkL4 QrfA== X-Gm-Message-State: AOAM530qy6yrwhPa1Z7jlRgzX8uj6WvMS+UNYI9oTy7XhiddoNFE3uxP SgQq2qKgNjUoe40PFeaH9dE= X-Received: by 2002:a05:6402:1157:: with SMTP id g23mr28743255edw.303.1618224171909; Mon, 12 Apr 2021 03:42:51 -0700 (PDT) Received: from linux.local (host-95-237-55-30.retail.telecomitalia.it. [95.237.55.30]) by smtp.gmail.com with ESMTPSA id mp36sm5330293ejc.48.2021.04.12.03.42.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 03:42:51 -0700 (PDT) From: "Fabio M. De Francesco" To: Greg KH Cc: outreachy-kernel@googlegroups.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [Outreachy kernel] [PATCH] staging: rtl8192u: Remove function Date: Mon, 12 Apr 2021 12:42:50 +0200 Message-ID: <5043782.cgFr61IFxu@linux.local> In-Reply-To: References: <20210411184813.22836-1-fmdefrancesco@gmail.com> <4388012.RVq5xMhMDq@linux.local> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, April 12, 2021 12:22:03 PM CEST Greg KH wrote: > On Mon, Apr 12, 2021 at 12:12:34PM +0200, Fabio M. De Francesco wrote: > > On Monday, April 12, 2021 11:42:51 AM CEST Greg KH wrote: > > > On Sun, Apr 11, 2021 at 08:48:13PM +0200, Fabio M. De Francesco wrote: > > > > Remove cmpk_handle_query_config_rx() because it just initializes a > > > > local > > > > variable and then returns "void". > > > > > > > > Signed-off-by: Fabio M. De Francesco > > > > --- > > > > > > > > drivers/staging/rtl8192u/r819xU_cmdpkt.c | 40 > > > > ------------------------ > > > > 1 file changed, 40 deletions(-) > > > > > > > > diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.c > > > > b/drivers/staging/rtl8192u/r819xU_cmdpkt.c index > > > > 4cece40a92f6..d5a54c2d3086 100644 > > > > --- a/drivers/staging/rtl8192u/r819xU_cmdpkt.c > > > > +++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.c > > > > @@ -249,46 +249,6 @@ static void > > > > cmpk_handle_interrupt_status(struct > > > > net_device *dev, u8 *pmsg)> > > > > > > > > DMESG("<---- cmpk_handle_interrupt_status()\n"); > > > > > > > > } > > > > > > > > -/*---------------------------------------------------------------- > > > > ---- > > > > --------- - * Function: cmpk_handle_query_config_rx() > > > > - * > > > > - * Overview: The function is responsible for extract the > > > > message > > > > from - * firmware. It will contain dedicated info in > > > > - * ws-06-0063-rtl8190-command-packet-specification. > > > > Please > > > > > > - * refer to chapter "Beacon State Element". > > > > - * > > > > - * Input: u8 *pmsg - Message Pointer of the > > > > command packet. > > > > > > - * > > > > - * Output: NONE > > > > - * > > > > - * Return: NONE > > > > - * > > > > - * Revised History: > > > > - * When Who Remark > > > > - * 05/12/2008 amy Create Version 0 porting from > > > > windows code. > > > > > > - * > > > > - > > > > *------------------------------------------------------------------ > > > > --- > > > > ------ - */ > > > > -static void cmpk_handle_query_config_rx(struct net_device *dev, u8 > > > > *pmsg) -{ > > > > - struct cmpk_query_cfg rx_query_cfg; > > > > - > > > > - /* 1. Extract TX feedback info from RFD to temp structure > > > > buffer. */ > > > > > > - /* It seems that FW use big endian(MIPS) and DRV use little > > > > endian in > > > > > > - * windows OS. So we have to read the content byte by byte or > > > > transfer > > > > - * endian type before copy the message copy. > > > > - */ > > > > - rx_query_cfg.cfg_action = (pmsg[4] & 0x80) >> 7; > > > > - rx_query_cfg.cfg_type = (pmsg[4] & 0x60) >> 5; > > > > - rx_query_cfg.cfg_size = (pmsg[4] & 0x18) >> 3; > > > > - rx_query_cfg.cfg_page = (pmsg[6] & 0x0F) >> 0; > > > > - rx_query_cfg.cfg_offset = pmsg[7]; > > > > - rx_query_cfg.value = (pmsg[8] << 24) | > > > > (pmsg[9] << 16) | > > > > > > - (pmsg[10] << 8) > > | > > | (pmsg[11] << 0); > > | > > > > - rx_query_cfg.mask = (pmsg[12] << 24) | > > > > (pmsg[13] << 16) | > > > > > > - (pmsg[14] << 8) > > | > > | (pmsg[15] << 0); > > | > > > > -} > > > > - > > > > > > > > /*---------------------------------------------------------------- > > > > ---- > > > > ---------> > > > > > > > > * Function: cmpk_count_tx_status() > > > > * > > > > > > Always test-build your patches as they can not break the build. You > > > obviously did not do that here, why not? > > > > I can't see that where the build of rtl8192u is broken. > > The following lines are from the compilation log: > > > > git/kernels/staging> make -j8 drivers/staging/rtl8192u/ > > > > [...] > > CC [M] drivers/staging/rtl8192u/r819xU_cmdpkt.o > > CC [M] drivers/staging/rtl8192u/r819xU_cmdpkt.o > > [...] > > LD [M] drivers/staging/rtl8192u/r8192u_usb.o > > > > No errors are reported. > > > > What am I missing? > > The function is used elsewhere in this file :( > You're right, it is used in a "switch" statement later in the file. Now I've also understood why it built with no errors: it built because, notwithstanding that modification, for some reason I have still the original version of the file. I don't know why, maybe I've made some stupid error with Git... Thanks, Fabio