Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp7759081yba; Thu, 2 May 2019 16:00:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZ2w2XjfmxnPUJjNGBmiACpoV2q0lqaJFuRiOXHXyvKbBuxN38r7ousR9jYujBns+RCFFx X-Received: by 2002:a17:902:7d91:: with SMTP id a17mr6533402plm.338.1556838028382; Thu, 02 May 2019 16:00:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556838028; cv=none; d=google.com; s=arc-20160816; b=eknKvpOCdZ4Al/4P3S68yMZi/zuaXx4XZJLLfi9zhh52BNtwaKQSKDMZtEZ9ks7j7d fwQobmUcOmTTrKW+00MXDIuLeqI5JjhkbfDP2j523EhtNX5SmDNma6HyZBfMyW0CwZ7i gejdsw+3j/RrGusk3vzS/SeUvC1/9pt9cNqiOQkDM1rwzl8R0aZg5m7T4zHlcsF4H8vo QGp4N0z8UtePjhTQ3dad9bR+S5a1nNp4V/uwQy4O1OM6eoB5gCZZyWX3oMQ7AgdCVDKk xx6n2oo9d0bZ9S3leNRpfg7GBA8dzk51La4HaPHjkXubwzW5NOINq16sF6lPT2qEaCzW 1BSQ== 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:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=AmMJvvqepFQ5FHhs6fnEWr1vFGhqHnFVdKxKjcKH6a4=; b=ltI3VZFTHSLl3Uw1Ef2qme9h9C2l3di2OncXhuKwbL/8tkfZzxZ9Zb5Re0mhEf7VhM vJMczGm+ccIHxEd50XDMPmWLjdJASUQrGyd2eYvbHtTz7yjEwzkdptcaZ26E8vR0SU7K MfzdTDISpkpgue7mMHk37YIqWfrBTVejkmB+fCZPLx4c8GoReXZTk1U5h0JBewsTepy4 6mLlJ0bKH9wQSVRq0amBHArQLazkdg0HuvzwfQiC4676vXDNgA4yxVZwFF22fnd1NnQH Tj8mfuM3FEr9qMGHQY7CzGh6sZautFuWdpjto4lY74UQt2x5uBuHv9SA6HXWZVc/UNsZ YuRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=lYGN5u3U; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o19si354285pgk.324.2019.05.02.16.00.07; Thu, 02 May 2019 16:00:28 -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=fail header.i=@gmail.com header.s=20161025 header.b=lYGN5u3U; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726280AbfEBW7P (ORCPT + 99 others); Thu, 2 May 2019 18:59:15 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:40697 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726030AbfEBW7P (ORCPT ); Thu, 2 May 2019 18:59:15 -0400 Received: by mail-oi1-f196.google.com with SMTP id y64so3084541oia.7; Thu, 02 May 2019 15:59:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:reply-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=AmMJvvqepFQ5FHhs6fnEWr1vFGhqHnFVdKxKjcKH6a4=; b=lYGN5u3UrNDWpzULcNN9d1p0UrAFqtE3esM8eOVv6AwDw+bAC03dZVwqCIvE5/Ik2k 6pZAfZAU2YVG+SkHXay5xUaWpLN87MFck5zdsLX4DpfjudEH/VmeR3CoPeFQdF+E8Sz1 mXZQka7ySmS0niH6abC6mJhMG5fxGwXHfTeTvUSG5fsdcEtA+iSxke7dPGe6viu/bwxy liGscJWr/OzDwf42DN9fIVcQjphxUEvjYadYLDDW+WuR89sqdVYvYxlfy97ajuC1bsLU msyU/Hr8OTXgiJ/iiq9RTYjIDRAQ+kHTOJmP1zVX98vqw0piJvIbG+cite/qmvY5Nbp2 hl4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :reply-to:references:mime-version:content-disposition:in-reply-to :user-agent; bh=AmMJvvqepFQ5FHhs6fnEWr1vFGhqHnFVdKxKjcKH6a4=; b=MFp7KqXtgh+9oHjqtFs2oDPEicnJjg07UY5mHYcZzS7hpPm/DBphn0Ppy9E2faESRA lL/eLaYAG2BySuUDgccCJtsxnvFmzUJ1yCeFC86dvUcZOm4VxJ7B+Xvud4shRgE4K3pX 4lahFviMUl6E9vWdZA1VDBQZufeNhWdUNrfp2wcsuXkuyBHaMKI5iH5T33mEmybiCRyk wpPkmT6yfNDSuZFCWxAQrzsmJUp6E/1wumENTUQGnfRk2JHL5eOT92rfw0hhd+p9a9vN AEXmp1UeAT05sPo1rynwsxZExc8x5HY17Ism7oq1hNeNDPMMCNl0VDF5umGRUqowjWr5 ZM7w== X-Gm-Message-State: APjAAAUzR0IUWktoEZV2TUT2gEzofpuvx4XmgxkpI4AFxaU2I9FDszeW TfnBn9+aqkkyBmcSDFKFo/lCSF4= X-Received: by 2002:aca:ef82:: with SMTP id n124mr4074950oih.177.1556837954144; Thu, 02 May 2019 15:59:14 -0700 (PDT) Received: from serve.minyard.net ([47.184.134.43]) by smtp.gmail.com with ESMTPSA id m124sm280130oia.3.2019.05.02.15.59.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 May 2019 15:59:13 -0700 (PDT) Received: from minyard.net (unknown [IPv6:2001:470:b8f6:1b:d5e:aa5a:44d8:6907]) by serve.minyard.net (Postfix) with ESMTPSA id 296321800D6; Thu, 2 May 2019 22:59:12 +0000 (UTC) Date: Thu, 2 May 2019 17:59:11 -0500 From: Corey Minyard To: Vadim Pasternak Cc: Asmaa Mnebhi , "wsa@the-dreams.de" , Michael Shych , "linux-kernel@vger.kernel.org" , "linux-i2c@vger.kernel.org" Subject: Re: [PATCH v4 0/1] Add support for IPMB driver Message-ID: <20190502225910.GK6623@minyard.net> Reply-To: minyard@acm.org References: <20190502194954.GJ6623@minyard.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 02, 2019 at 09:14:46PM +0000, Vadim Pasternak wrote: > [...] > > > > > > >>Better, if you can avoid cast. > > > >>Would compiler warn if you use for example rol16(client->addr, 1) & > > GENMASK(7, 0); or something like it? > > > I thought it wouldn't be too much of an issue to use typecast here since other > > existing ipmi drivers use typecasting: bt-bmc.c, kcs_bmc_aspeed.c, > > kcs_bmc_npcm7xx.c all use (u8) typecasting. > > > But if you really think it is worth it, I could do that. > > > I just think it is not as straight forward to read this code as using a simple > > typecast. Some might wonder why a GENMASK is needed in this case. > > > > > Hi Asmaa, > > I will not insist in case it's OK with maintainers. > > [...] I'm mostly against casts unless they are necessary, as they tend to clutter up the code. But I don't feel that strongly about it. I'm not sure how other maintainers feel. -corey