Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2339760ybb; Thu, 2 Apr 2020 18:43:51 -0700 (PDT) X-Google-Smtp-Source: APiQypIqmtlHhM6fZVTJhTMd9Lqv4baONE71Ughw45F1GicOFXQK/Qf25kabD4MfcmCODcFucBVH X-Received: by 2002:a4a:d2de:: with SMTP id j30mr4975511oos.95.1585878231262; Thu, 02 Apr 2020 18:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585878231; cv=none; d=google.com; s=arc-20160816; b=ytiaMxipttmI94WBgdf8RWMKgFIJUGoLrx3pBANP9ExR7rU0tqX/o+vxTlBk1jgUVT /VDf1SKw7+HtuvtO9uTToXNNbBxe9M9t7r+vjE8O5tkPAuv1qtFoPgUCcNoJ3AWdhuWv 0PL6IzYxoJJtkC+outk0CgormnpDTt1eXWzBFcE+6pYmEnSwMG5emZrskGfqXGfNviGu wYBz2ToES7/n33T2iwiao/TWovfpSqW/2CPmhzoc2HPqeIImiPB2Q8mfypyDyASeF3IO MZCVf8EyANmO2T6Pu5SqgnYYDudJOyqx1a+/p4k8/3He9atYqT4lIB3rHm030eXq3M9V N7qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=4tU1ijP1oUMss+gZHdPAOpYayM4wwWRsIDBObxKGiVc=; b=iwbO/pFeOQJHkTIOByZw+2FdnlmZ5hcFo9tl4Yb8C9e2Un8OPwRjQT0iNNmryS56/q DMxHGt88iQjLIetsR1WyTTjsKda8r6Kp57YMDOomJ16to/wMr9r45V3nWh7OoEZZvu1m EuxBhvfpir5GYm5Kye02vRHbobVqHEpcpmT30ye3PQHwKttf8oXmfvJzOvAqD2wpP6Rj Ff/66hER9gW4ddOpi6r8C1RYliZ8SYSZKCoVF99OMwFcEppTE5VI9sCC/CpxRu/gFWvn KxpEAhT5oPKQW4j0s8xBp8tllNpWtC/tVVI/nHxvTBOB4lRwdzqkIMIW98Iyc2Vfuiok TjXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jcNzEg9v; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si2763069otm.3.2020.04.02.18.43.37; Thu, 02 Apr 2020 18:43:51 -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=@gmail.com header.s=20161025 header.b=jcNzEg9v; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390169AbgDCBms (ORCPT + 99 others); Thu, 2 Apr 2020 21:42:48 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:37078 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389108AbgDCBmr (ORCPT ); Thu, 2 Apr 2020 21:42:47 -0400 Received: by mail-ot1-f65.google.com with SMTP id g23so5719573otq.4 for ; Thu, 02 Apr 2020 18:42:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=4tU1ijP1oUMss+gZHdPAOpYayM4wwWRsIDBObxKGiVc=; b=jcNzEg9v7lRqKPNG1zObRdcQjh+gk/bUr/tEisbEtBl1s86IubloinTf3XxKH1pJ48 MjFvtnWUc4FVghMd0K9IIenpvKmY9xJRkA2egW8LZ+LUUY9tckpWwmoo04mhVO8gHDhV SUzUrFy6U0Mn7jHtBlYogC+rMizjsYnn5t1IaCgnhBSJ6fMfoeBs/iY7UEcpa6hr707z UtNoR4N/9LmswlUU+NqsLQwPd+MphCGsdz+ezQPXx6Qxej1ggf5ZYg3H5U8848PxyTmQ vza2rb0NNr2iNeTGReJyDtVvixNzXmqiCsRyLI+k8tQmVi4zeskFKPMFFRswTaGL8fZa 03/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=4tU1ijP1oUMss+gZHdPAOpYayM4wwWRsIDBObxKGiVc=; b=q7tK1KzHmYtFCAku31wJZ+Py87J7whgCI35YPW3/6jiFw6JU3dlidSFIY99Yzk2MYT tDQ3BXk8bJTXIozZ+XYopIC8s4YV7jyhDDd/doSKcYZyHZWpNDq/dcNxqmlPxHDKPPk/ /y+S7xl12wB5LAmGoiX5niKZhhN2/9UUGdLquuiffoT6hKjBD4IXzCZ6wQ4YZ2MMSrYW A3I4JXf6bSzCYEtPE971w2jw7TGx/QKEIIOVJCwpiSiXAY8QwzYBvet1EKz4xjkh65a3 WpSNiusr6MR6HbL6ms/iNsE7+kVOdyugecNLwYxC9IEM6wYY0kdyw/HMthZirige05LH /Rfg== X-Gm-Message-State: AGi0PuYRczxk4lvXrmwk16UPvbSSw/LbmJ1zAoWnhXerC8Aai+PSQPVp SnMJmKPtxpRMONUYna4HSIE= X-Received: by 2002:a4a:92cd:: with SMTP id j13mr5039878ooh.96.1585878166813; Thu, 02 Apr 2020 18:42:46 -0700 (PDT) Received: from OptiPlexFedora ([47.144.161.84]) by smtp.gmail.com with ESMTPSA id t19sm1809875oih.52.2020.04.02.18.42.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 18:42:46 -0700 (PDT) Message-ID: <4bd376a6db77ef779972f377cc2c3789d03668e7.camel@gmail.com> Subject: Re: [Outreachy kernel] [PATCH] staging: emxx_udc: Remove unused code From: "John B. Wyatt IV" To: Stefano Brivio Cc: outreachy-kernel@googlegroups.com, Greg Kroah-Hartman , Saiyam Doshi , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Date: Thu, 02 Apr 2020 18:42:44 -0700 In-Reply-To: <20200403015057.7a972c79@elisabeth> References: <20200402021706.788533-1-jbwyatt4@gmail.com> <20200403015057.7a972c79@elisabeth> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2020-04-03 at 01:50 +0200, Stefano Brivio wrote: > On Wed, 1 Apr 2020 19:17:06 -0700 > "John B. Wyatt IV" wrote: > > > Remove unused code surrounded by an #if 0 block. > > > > Code has not been altered since 2014 as reported by git blame. > > > > Reported by checkpatch. > > > > Signed-off-by: John B. Wyatt IV > > --- > > drivers/staging/emxx_udc/emxx_udc.h | 6 ------ > > 1 file changed, 6 deletions(-) > > > > diff --git a/drivers/staging/emxx_udc/emxx_udc.h > > b/drivers/staging/emxx_udc/emxx_udc.h > > index 9c2671cb32f7..bbfebe331033 100644 > > --- a/drivers/staging/emxx_udc/emxx_udc.h > > +++ b/drivers/staging/emxx_udc/emxx_udc.h > > @@ -9,12 +9,6 @@ > > #define _LINUX_EMXX_H > > > > /*-------------------------------------------------------------- > > -------------*/ > > -/*----------------- Default undef */ > > -#if 0 > > -#define DEBUG > > -#define UDC_DEBUG_DUMP > > -#endif > > - > > /*----------------- Default define */ > > #define USE_DMA 1 > > #define USE_SUSPEND_WAIT 1 > > Formally, this is fine. But... think about it: this driver might be > rather buggy, so the first thing one might want to do with it is to > "enable" those two defines. > > In general, that stuff has to disappear, and proper debugging > facilities have to be used, but with a driver in this state, as long > as > proper debugging facilities aren't there, you might be doing more > harm > than good. DEBUG is not actually used as far as I can tell (I am still new to kernel debugging systems to please correct me). There is only a pair of .c and .h files for this small driver. UDC_DEBUG_DUMP is only used twice in the entire kernel-both for if statements. Should we just set it to: #define UDC_DEBUG_DUMP 0 And leave the other 3 lines out? Please let me know for a v2. > > -- > Stefano >