Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6017073pxb; Mon, 14 Feb 2022 13:13:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJyy/TxG6Bt0L38QKeJSbyJoA60wiKWpwjYiqpNbi1P1vJoF7nSFJFDJ3R+31t6NzurQPhjO X-Received: by 2002:a17:90b:3b48:: with SMTP id ot8mr575910pjb.167.1644873210115; Mon, 14 Feb 2022 13:13:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644873210; cv=none; d=google.com; s=arc-20160816; b=GkMdyej5B8Eq0S5gOKx8CPa69QnpFPB2xc30YhJZgslYchL2ovOMIqqPSEIpwye+Z3 kl3CRM1iQvPqDseK6ymVNp3aWC7uKg9woOOuaZvBcUdHKuACD0Ny5LyYMhKCdOtg9ENZ TMsD1szgyDuYFicEs3GvBygqAC8HGgxvY8fdQI9bgqZ9IgknhcjxqkAFMA1uGyTF3Qiy yndeuwTuy6oxnszxrZtiXMeGAlLbwLtxOaUsAsvxj/JLWucQOetUS9QPvWvTMG3uSCnu 7ubpt1NMVT0TpdXI6fyIQCYqCjmQvuABkyqZ9hF71SwQY3R50Xy0MPoe/RWXjs5X/xIF /KoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=P++DMPCoLYeSHVVEkYGtT1XsH/0G6lrbTxQxRb5m1lM=; b=qG2adw/kvS6/pcvMFoVWSaI7PjDFMLNNKEB/CI3UPbSaGvPNm1VYfmR1W0vlTRULCK bWVxdbdgniOkeng7YpbfFlh0iYxiIt+i7Kjn4LXWPDxWngYyftmP89of5PMWAXlSsBLr ixsrYNKOZYXIYN3k2/rEDCBk/LtIur4qsK360gSpZgQoUVMLM4/ftmQiSbkSVZrObnY8 JwIxaQA1IgiMXOaKlS/ZxcO3yT726Ec6Sl8Y7JUplwABADdJmVNvsX/5m1stslEwN0+R 7tRZUh01wRX1t+Nx/u1vnR9/bol7E66eH1IWrt+RThPDonrDK2c9Gtx0QX1/4uApLhxQ UR5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=Mu5uAhGJ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c189si835222pga.86.2022.02.14.13.13.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 13:13:30 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=Mu5uAhGJ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 05537199D58; Mon, 14 Feb 2022 12:32:38 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356284AbiBNQVC (ORCPT + 99 others); Mon, 14 Feb 2022 11:21:02 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356296AbiBNQUo (ORCPT ); Mon, 14 Feb 2022 11:20:44 -0500 X-Greylist: delayed 1390 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 14 Feb 2022 08:20:36 PST Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43D1942EE7 for ; Mon, 14 Feb 2022 08:20:36 -0800 (PST) Received: from pps.filterd (m0134425.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 21EFuV8X020516; Mon, 14 Feb 2022 15:57:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pps0720; bh=P++DMPCoLYeSHVVEkYGtT1XsH/0G6lrbTxQxRb5m1lM=; b=Mu5uAhGJsIb1XoS0DqT65OJI+V90s9tMan0lAcMloYeeDXEQ4vjGiReG/21ZTrQIhkhT n4PGWs5O790Ra/WvNnXjC1xbIdweIl4Y8+XcZnwdX36oeDlmh7iz/2p/EXd7uzMGyws+ K2AUp+PhGQEGVUFSDwewINoyziyeoCYhlmYOQDsuu1UL4Jg8xm6X8VeCwa578xdmeNHp n/3K0VqSsgfGMNqA2k2x2izWcd03WREPn7u2TVixkyDfZ0V1AkQXJbsd178wTGnRxnyT v5WKlfqC+Hlr8aCG6H0lCOfcXG3n0Wjf1/+lXqXTIbH1SiCzDyykSS+xh2lqUzM77egx 0Q== Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3e7kkrup4q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Feb 2022 15:57:12 +0000 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2353.austin.hpe.com (Postfix) with ESMTP id 95DCC82; Mon, 14 Feb 2022 15:57:11 +0000 (UTC) Received: from hpe.com (unknown [10.207.195.135]) by g2t2360.austin.hpecorp.net (Postfix) with ESMTP id 029D93B; Mon, 14 Feb 2022 15:57:09 +0000 (UTC) Date: Mon, 14 Feb 2022 09:57:09 -0600 From: Dimitri Sivanich To: Andy Shevchenko Cc: Xiyu Yang , linux-kernel@vger.kernel.org, Dimitri Sivanich , Arnd Bergmann , Greg Kroah-Hartman Subject: Re: [PATCH v1 1/1] misc: sgi-gru: Don't cast parameter in bit operations Message-ID: <20220214155709.GA3858@hpe.com> References: <20220214153958.9721-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220214153958.9721-1-andriy.shevchenko@linux.intel.com> X-Proofpoint-GUID: Kw-w50yEarRKtWNI7JFKQJIVTpsUiG3R X-Proofpoint-ORIG-GUID: Kw-w50yEarRKtWNI7JFKQJIVTpsUiG3R X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-02-14_07,2022-02-14_03,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 bulkscore=0 mlxlogscore=999 clxscore=1011 lowpriorityscore=0 malwarescore=0 adultscore=0 priorityscore=1501 mlxscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202140097 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Acked-by: Dimitri Sivanich On Mon, Feb 14, 2022 at 05:39:58PM +0200, Andy Shevchenko wrote: > While in this particular case (*) it would not be an issue, > the pattern itself is bad and error prone in case somebody > blindly copies to their code. > > Don't cast parameter to unsigned long pointer in the bit > operations. Note, new compilers might warn on this line for > potential outbound access. > > *) it seems a dead code, so remove it all for good > > Fixes: 13d19498b044 ("GRU Driver: driver internal header files") > Signed-off-by: Andy Shevchenko > --- > drivers/misc/sgi-gru/grutables.h | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/misc/sgi-gru/grutables.h b/drivers/misc/sgi-gru/grutables.h > index e4c067c61251..5efc869fe59a 100644 > --- a/drivers/misc/sgi-gru/grutables.h > +++ b/drivers/misc/sgi-gru/grutables.h > @@ -530,12 +530,6 @@ struct gru_blade_state { > for ((i) = (k)*GRU_CBR_AU_SIZE; \ > (i) < ((k) + 1) * GRU_CBR_AU_SIZE; (i)++) > > -/* Scan each DSR in a DSR bitmap. Note: multiple DSRs in an allocation unit */ > -#define for_each_dsr_in_allocation_map(i, map, k) \ > - for_each_set_bit((k), (const unsigned long *)(map), GRU_DSR_AU) \ > - for ((i) = (k) * GRU_DSR_AU_CL; \ > - (i) < ((k) + 1) * GRU_DSR_AU_CL; (i)++) > - > #define gseg_physical_address(gru, ctxnum) \ > ((gru)->gs_gru_base_paddr + ctxnum * GRU_GSEG_STRIDE) > #define gseg_virtual_address(gru, ctxnum) \ > -- > 2.34.1