Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2674198ybg; Thu, 24 Oct 2019 13:20:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYntgwk+Ocx5ITXvAPTlshzugB7G/KHoI2Lv8GsXrhirK7oLwjyi51XjjKir89bqFxjkk2 X-Received: by 2002:a17:906:50d:: with SMTP id j13mr33667eja.146.1571948457394; Thu, 24 Oct 2019 13:20:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571948457; cv=none; d=google.com; s=arc-20160816; b=lJPeM8SP0FaIfzQOy/GMtDaTD3DpHMEjbFnrHRHDlz0FMQmUENzaFwf2KA/BlzMZ/8 jfIbtovPXqwyDHrfWiqYf4QqfiT57RXkwOTgyOkksHZKrFHHBU7t1vswjdCLFj807ACG lJhv81JofIvZmZmfHXAgoFaB/CV/8vh48575ijY/yPQ4qJeSJgSXoKcrZlb6HZoF5gIN 8zGj33Wei6iZ+TwfqoMqDATE7zpaVM3moKJ9X1SRnHgXG1YjX4auYo6YB6v/k5jrtXrg YyicA4HfEtNvOrRsWpkkCW+xxYjIMA9ATup6Q44p7MqLBsFle+MZWo7QTpBF12e4O55d wBiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=TX+eCZ+Hj86+D+zTjguBkdVgaoLDrd0ZTB0tF031IC4=; b=0/0FjmSVhbyMI00QjqMh3l+1Z13jeFRpo2CI5p+HhDb4VuCiRwFd694+NR6VyP4G5f HYH51DBi/ZA/ew5u9lBYgCjojaHuvYy9Yk2iI4I2k7cmU/8zgEut7ZMz/E7IWkXVCQjR CJLQ+FWDc24Dx7cF/t/eHgf5i/iJUiBjioaHA9QWJUMpdKn7H5eEUCm+MeVos+DvqOvu DhQsVTwt6lLA3O7W9EijxDVhJkcLCLpC2tCVeF76pmG2Vb52GcuUc24RydAqkhOxgmbb KPWDvxxhOCewSYB7UF07KqcAZM62r6lq7cCUvuPHl5waIzn2VB6bKR7296smwZCiT0V7 m1iw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x51si17263334edd.193.2019.10.24.13.20.32; Thu, 24 Oct 2019 13:20:57 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408383AbfJXE76 (ORCPT + 99 others); Thu, 24 Oct 2019 00:59:58 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:45285 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725298AbfJXE75 (ORCPT ); Thu, 24 Oct 2019 00:59:57 -0400 Received: by mail-pf1-f193.google.com with SMTP id x28so862007pfi.12 for ; Wed, 23 Oct 2019 21:59:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=TX+eCZ+Hj86+D+zTjguBkdVgaoLDrd0ZTB0tF031IC4=; b=OCxBoOaUf+Ra0G95IGxGnD9URd/Bktt5xs5HpE+OO55UiDEQOXpF2Qo8NVV1p/s+bj vxBGxz+fa9NV+x4p5lFvzWmZxRT51pwOrdv9gxTzNl7OCg5P9Jj0CwCFb6hlG3NDj43x 6BK8y/ePvtEUzI8SGsepmqT2QpensnhiXkgEN7I9lZJWURRp5+rdi3vwbSNBoEeOZiY7 Vi1BqIczXcKJxME5ZyXFWamfvbGZchXjCMHl79T7NcfxhEOyszu7dRzJOFC+7/zJZhP6 mH4ZlSM0C82hs2mk5rc3CXFHMlBjElBDOxrePT0MeHMyVk6/PmU+1C6Iwb3hjeg+TqU8 M5WA== X-Gm-Message-State: APjAAAWBiECiukO4kj4oG8A2ssFk6p6OkBTrrI7eROUZRtRToNHU1cn7 IxV2Y7p25inlWCkvegaPAwoEPBs2IZ8otA== X-Received: by 2002:a17:90a:37e4:: with SMTP id v91mr4666767pjb.8.1571893196275; Wed, 23 Oct 2019 21:59:56 -0700 (PDT) Received: from localhost ([2601:646:8a00:9810:5af3:56d9:f882:39d4]) by smtp.gmail.com with ESMTPSA id h4sm21932440pgg.81.2019.10.23.21.59.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2019 21:59:55 -0700 (PDT) Date: Wed, 23 Oct 2019 22:00:11 -0700 From: Paul Burton To: Wambui Karuga , gregkh@linuxfoundation.org Cc: outreachy-kernel@googlegroups.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/5] staging: octeon: remove typedef declaration for cvmx_wqe Message-ID: <20191024050011.2ziewy6dkxkcxzvo@lantea.localdomain> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Wambui, Greg, On Sat, Oct 12, 2019 at 09:04:31PM +0300, Wambui Karuga wrote: > Remove typedef declaration from struct cvmx_wqe. > Also replace its previous uses with new struct declaration. > Issue found by checkpatch.pl This may work for x86 builds using COMPILE_TEST that will never actually run this driver, but it completely breaks the build for the systems that actually do use the driver... kernelci.org shows build failures resulting from this patch in linux-next, and I won't be surprised if other patches in this series result in similar build breakage too: https://storage.kernelci.org/next/master/next-20191023/mips/cavium_octeon_defconfig/gcc-8/build.log If you're making significant changes to this driver, please test them using the MIPS cavium_octeon_defconfig which is where this driver is actually used. This driver has broken builds a few times recently which makes me very tempted to ask that we stop allowing it to be built with COMPILE_TEST. The whole octeon-stubs.h thing is a horrible hack anyway... Thanks, Paul > > Signed-off-by: Wambui Karuga > --- > drivers/staging/octeon/ethernet-rx.c | 6 +++--- > drivers/staging/octeon/ethernet-tx.c | 2 +- > drivers/staging/octeon/ethernet.c | 2 +- > drivers/staging/octeon/octeon-stubs.h | 22 +++++++++++----------- > 4 files changed, 16 insertions(+), 16 deletions(-) > > diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c > index 0e65955c746b..2c16230f993c 100644 > --- a/drivers/staging/octeon/ethernet-rx.c > +++ b/drivers/staging/octeon/ethernet-rx.c > @@ -60,7 +60,7 @@ static irqreturn_t cvm_oct_do_interrupt(int irq, void *napi_id) > * > * Returns Non-zero if the packet can be dropped, zero otherwise. > */ > -static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work) > +static inline int cvm_oct_check_rcv_error(struct cvmx_wqe *work) > { > int port; > > @@ -135,7 +135,7 @@ static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work) > return 0; > } > > -static void copy_segments_to_skb(cvmx_wqe_t *work, struct sk_buff *skb) > +static void copy_segments_to_skb(struct cvmx_wqe *work, struct sk_buff *skb) > { > int segments = work->word2.s.bufs; > union cvmx_buf_ptr segment_ptr = work->packet_ptr; > @@ -215,7 +215,7 @@ static int cvm_oct_poll(struct oct_rx_group *rx_group, int budget) > struct sk_buff *skb = NULL; > struct sk_buff **pskb = NULL; > int skb_in_hw; > - cvmx_wqe_t *work; > + struct cvmx_wqe *work; > int port; > > if (USE_ASYNC_IOBDMA && did_work_request) > diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c > index c64728fc21f2..a039882e4f70 100644 > --- a/drivers/staging/octeon/ethernet-tx.c > +++ b/drivers/staging/octeon/ethernet-tx.c > @@ -515,7 +515,7 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev) > void *copy_location; > > /* Get a work queue entry */ > - cvmx_wqe_t *work = cvmx_fpa_alloc(CVMX_FPA_WQE_POOL); > + struct cvmx_wqe *work = cvmx_fpa_alloc(CVMX_FPA_WQE_POOL); > > if (unlikely(!work)) { > printk_ratelimited("%s: Failed to allocate a work queue entry\n", > diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c > index cf8e9a23ebf9..f892f1ad4638 100644 > --- a/drivers/staging/octeon/ethernet.c > +++ b/drivers/staging/octeon/ethernet.c > @@ -172,7 +172,7 @@ static void cvm_oct_configure_common_hw(void) > */ > int cvm_oct_free_work(void *work_queue_entry) > { > - cvmx_wqe_t *work = work_queue_entry; > + struct cvmx_wqe *work = work_queue_entry; > > int segments = work->word2.s.bufs; > union cvmx_buf_ptr segment_ptr = work->packet_ptr; > diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h > index b2e3c72205dd..7c29cfbd55d1 100644 > --- a/drivers/staging/octeon/octeon-stubs.h > +++ b/drivers/staging/octeon/octeon-stubs.h > @@ -183,13 +183,13 @@ union cvmx_buf_ptr { > } s; > }; > > -typedef struct { > +struct cvmx_wqe { > union cvmx_wqe_word0 word0; > union cvmx_wqe_word1 word1; > union cvmx_pip_wqe_word2 word2; > union cvmx_buf_ptr packet_ptr; > uint8_t packet_data[96]; > -} cvmx_wqe_t; > +}; > > typedef union { > uint64_t u64; > @@ -1198,7 +1198,7 @@ static inline uint64_t cvmx_scratch_read64(uint64_t address) > static inline void cvmx_scratch_write64(uint64_t address, uint64_t value) > { } > > -static inline int cvmx_wqe_get_grp(cvmx_wqe_t *work) > +static inline int cvmx_wqe_get_grp(struct cvmx_wqe *work) > { > return 0; > } > @@ -1345,14 +1345,14 @@ static inline void cvmx_pow_work_request_async(int scr_addr, > cvmx_pow_wait_t wait) > { } > > -static inline cvmx_wqe_t *cvmx_pow_work_response_async(int scr_addr) > +static inline struct cvmx_wqe *cvmx_pow_work_response_async(int scr_addr) > { > - cvmx_wqe_t *wqe = (void *)(unsigned long)scr_addr; > + struct cvmx_wqe *wqe = (void *)(unsigned long)scr_addr; > > return wqe; > } > > -static inline cvmx_wqe_t *cvmx_pow_work_request_sync(cvmx_pow_wait_t wait) > +static inline struct cvmx_wqe *cvmx_pow_work_request_sync(cvmx_pow_wait_t wait) > { > return (void *)(unsigned long)wait; > } > @@ -1390,21 +1390,21 @@ static inline cvmx_pko_status_t cvmx_pko_send_packet_finish(uint64_t port, > return ret; > } > > -static inline void cvmx_wqe_set_port(cvmx_wqe_t *work, int port) > +static inline void cvmx_wqe_set_port(struct cvmx_wqe *work, int port) > { } > > -static inline void cvmx_wqe_set_qos(cvmx_wqe_t *work, int qos) > +static inline void cvmx_wqe_set_qos(struct cvmx_wqe *work, int qos) > { } > > -static inline int cvmx_wqe_get_qos(cvmx_wqe_t *work) > +static inline int cvmx_wqe_get_qos(struct cvmx_wqe *work) > { > return 0; > } > > -static inline void cvmx_wqe_set_grp(cvmx_wqe_t *work, int grp) > +static inline void cvmx_wqe_set_grp(struct cvmx_wqe *work, int grp) > { } > > -static inline void cvmx_pow_work_submit(cvmx_wqe_t *wqp, uint32_t tag, > +static inline void cvmx_pow_work_submit(struct cvmx_wqe *wqp, uint32_t tag, > enum cvmx_pow_tag_type tag_type, > uint64_t qos, uint64_t grp) > { } > -- > 2.23.0 > > _______________________________________________ > devel mailing list > devel@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel