Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1922252imm; Tue, 10 Jul 2018 10:02:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcbcrdYpuOREyil2DGs72VB3t9DUPn8ZSjdKASnrlrH2qpwGy0WVsgHprvM2BYsj6dmZPQK X-Received: by 2002:a63:7d7:: with SMTP id 206-v6mr18759825pgh.137.1531242161983; Tue, 10 Jul 2018 10:02:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531242161; cv=none; d=google.com; s=arc-20160816; b=HYcS45jVOSKU2d18p4TReVRqsq4JJ9n+ggJHTC7C2Ztn6Gc02jIBIxvy39uqb62V0o Yt510k8ub0fGs3J1FsvpBJ0xH9M9rM2uHjaOSaml4+L8pOUJHC1NeQw7DWfq3WH7KkAa qvTMbAEESUmFNp065eiRFH7gbmi1uYkeW6RUirkSXD+OZFL64L4BMhyrGh5XxaQDzLR3 a9H57CcSOxE0kNEgI3UB4fzRWIyctduT+BTgsun/bBHoghq7dYAC71oO19dTu6e6CD3P laeS+x3Vz55NEJhjXno6vdueKJjowO1ok4S/wX+hIRFGChaJBY501xbtLxj66TmLMA8z KjRg== 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:dkim-signature:arc-authentication-results; bh=6441l9eT0qpH28DLB7+8gN4DCkFikfOT4u0Ej5rwcjQ=; b=tIP5QIlbmkXBu0aXYe9TbYMKsg5KLjOeNxMvk0xFwWeadG4nO0avR51dKMbS45dfxg kS8DHGMcyh9A71owSjJZ/8SbtCA4JfkCcoR7uQG6iumSWtg9GyGRhs67BnYegnlmEqPu Ubsqse+wqxKguu/tYXNG5AHHtGPRfa4bcqgF4LZcE7fLeVnD+Vzv5Kd0NcBMo9s1e/Co eYOpeUesh2cHHEnSwomaJp1zBezmVBQDkANd7sfamMxHdUqmxaYst7+RA70br3bdsRss e2hvYhiMMzeCfs3g1x2qk/7FK1PNNko3BJmCvWBsRnB1HlpRE26Omub0ccW8AOKpV2/+ l0pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b="2oK/UoJL"; 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=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f7-v6si17170736plb.253.2018.07.10.10.02.26; Tue, 10 Jul 2018 10:02:41 -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=@oracle.com header.s=corp-2018-07-02 header.b="2oK/UoJL"; 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=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934598AbeGJQqA (ORCPT + 99 others); Tue, 10 Jul 2018 12:46:00 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:35510 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933331AbeGJQp7 (ORCPT ); Tue, 10 Jul 2018 12:45:59 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w6AGjMFT185565; Tue, 10 Jul 2018 16:45:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=6441l9eT0qpH28DLB7+8gN4DCkFikfOT4u0Ej5rwcjQ=; b=2oK/UoJLItEK3+I2KMVX1/TZK55QHmCyi1IT6bfjJRhm3cH17TPAZ0/hVkopDo5JP+Xf ucleOx7AWVRn+3Pt2GWqPkD8O7xjCb+wwwnG6sAE9W6fDXkoQ/4C9XhI3x9GW8Yg2T7X iZIscINf+q9W0A1xAcoZgv0pQ/CvywM1lNVz9eoR0OLVcr7+31F/8E5y/ymmbNSJmWa4 r9685W21vclAj3AtXp88jmcZTebtNj8rX8rFKPKYQrVXeFQB1rKhHLZJiV4xSE6qt9WN u437vrKIPMyoccvt6hr9m7hErVV2277zsXtZ0Jwlk4wCDxdzv9nOxweiL3MKtKSPNA1/ +w== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2k2p762tpw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Jul 2018 16:45:52 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w6AGjp2q002831 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Jul 2018 16:45:51 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w6AGjobB027931; Tue, 10 Jul 2018 16:45:51 GMT Received: from mwanda (/197.157.34.168) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 10 Jul 2018 09:45:50 -0700 Date: Tue, 10 Jul 2018 19:45:42 +0300 From: Dan Carpenter To: Ioana Ciocoi Radulescu Cc: "gregkh@linuxfoundation.org" , "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" , Ioana Ciornei Subject: Re: [PATCH 5/5] staging: fsl-dpaa2/eth: Remove Rx frame size check Message-ID: <20180710164541.ywfwlw5b7ecufuqa@mwanda> References: <20180709150111.8875-1-ruxandra.radulescu@nxp.com> <20180709150111.8875-6-ruxandra.radulescu@nxp.com> <20180709192809.msmwmtmgj4yxrhme@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8950 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807100178 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 10, 2018 at 03:55:32PM +0000, Ioana Ciocoi Radulescu wrote: > > -----Original Message----- > > From: Dan Carpenter [mailto:dan.carpenter@oracle.com] > > Sent: Monday, July 9, 2018 10:28 PM > > To: Ioana Ciocoi Radulescu > > Cc: gregkh@linuxfoundation.org; devel@driverdev.osuosl.org; linux- > > kernel@vger.kernel.org; Ioana Ciornei > > Subject: Re: [PATCH 5/5] staging: fsl-dpaa2/eth: Remove Rx frame size check > > > > On Mon, Jul 09, 2018 at 10:01:11AM -0500, Ioana Radulescu wrote: > > > @@ -2385,6 +2365,12 @@ static int netdev_init(struct net_device > > *net_dev) > > > > > > /* Set MTU upper limit; lower limit is 68B (default value) */ > > > net_dev->max_mtu = DPAA2_ETH_MAX_MTU; > > > + err = dpni_set_max_frame_length(priv->mc_io, 0, priv->mc_token, > > > + (u16)DPAA2_ETH_MFL); > > > > The cast was there in the original code so this is not a comment on this > > particular patch (which seems fine) but there is no need to cast. > > > > Generally it's best to avoid unnecessary casts. As a human reader, I > > find the cast confusing. It indicates that DPAA2_ETH_MFL somehow > > requires special handling. Perhaps it's negative or we are trying to > > truncate away the high bits. But neither of those things really make > > sense. > > > > From a static analysis perspective if DPAA2_ETH_MFL doesn't fit nicely > > then we would want to generate a warning. But the cast explicitly > > disables the check. > > I really don't remember why the cast was there in the first place. > It doesn't look like it's needed anymore, DPAA2_ETH_MFL has a > positive value (around 10K) that fits just fine inside a u16. > > I see Greg already applied the patch, so I'll send a separate one to > remove the cast. Yeah. I wasn't saying redo the patch. That was there in the original and it's not like it's a bug or anything. regards, dan carpenter