Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp524463imm; Tue, 15 May 2018 05:23:56 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqaQD7zS0JUKDLsjrBbp8Hv+1vXzqOikEsdr65AolRW6Y432qLGhvI2+HUvP+86GZo0HYTQ X-Received: by 2002:a63:798d:: with SMTP id u135-v6mr4534836pgc.112.1526387036151; Tue, 15 May 2018 05:23:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526387036; cv=none; d=google.com; s=arc-20160816; b=VbKIpZvkDAgV5fEa0y5bxmw2TuRCYmMp595QdsLi4EKE7IMK5VlPn1CR6S2TB4lnNG +lhouy+F8Cds6uChiVwSuSODgzKoUWgj6sDb/b/LebA2hSPbDFOmWkPR1x3n76qt55Uy j+w7FpDhPK9+3Bz5wT8F/dDfRPxbCE3XRL17YMYyy9VuSY7ddihfFytZMepvqCj+vI4y eBMAeJZHoPns1crSdfyyU20rtPelgcznh80/2Elwzq+2qsUBVf7FOaMdlVaDbI8aVDUk ZkqVEAuXJi3dud9lFnpMoAjmjYSgazo5anmXhek6Q8makbkaoP6EX7OIBK2NppjWMldh HfIg== 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=vrIqj+MpWVZz1Z9gNXN5g/GuQia8SZa88Eod4a3CHE0=; b=qfQmja88CTcqEHl+mpedIRvQuLxYu7BBi8OCeA1TUa4pgb2PKpEsjFpxevuyytaN70 SkG43Z9L667JeLSmyEDRoICZ/HWdce/f3KZwPBHvVJoSsbigeCCGWAexs2KG6cvFwhwV abPlskwAQ33lK8CJwqeFhwMo3htT/vzDQ8azqSbtHynx6pW0jgv1WYDMT2uRZlfoeYzM 4azm1K03oGazxth10abd371tjg7yD0DIwZPySFD2TOk1hlmNk5e4HvoveSJ0zPklcgC2 VAvUUIp0hloeDZNoH1GfoVsdVQw8I/Y5/Xch5XDt4HZfut5VRSGky32w85WTdqiwDCi4 jsJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=TcbnsdE5; 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 w12-v6si9384890pgp.252.2018.05.15.05.23.21; Tue, 15 May 2018 05:23:56 -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-2017-10-26 header.b=TcbnsdE5; 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 S1753307AbeEOMXG (ORCPT + 99 others); Tue, 15 May 2018 08:23:06 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:59264 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752377AbeEOMXE (ORCPT ); Tue, 15 May 2018 08:23:04 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4FCLDaJ069116; Tue, 15 May 2018 12:21:51 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-2017-10-26; bh=vrIqj+MpWVZz1Z9gNXN5g/GuQia8SZa88Eod4a3CHE0=; b=TcbnsdE59rmkdsvWYuypI32A4oVATXuqDc4mIFeRFEckE8AUfUVPHNyJdkvUFAPBr8oC RRri72TuyBjYM+pX2kWmGb3Rk1gZSUXsCovRC7OlIP3OSbhvV4nnLKTa9N7HzWVkO0vx awaapfH+ztpJTRZ9Szv7uXGM+ZQl4UCWkz0uj+eQKqWzTQImukkMu42W9DyYn6+7xVjf KjAayOWpLN2d18ydJcufyVSD1SXGuhJjmvln7HRda8i+EzABKQtM/uzI5PXnu3gIR9Gd QCoXZv2ryjIUR0NjWdTynRyY3DXptlYBbbznmVaiOY5LungXIys/+ZWNo16yrNFm5m6M rA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2130.oracle.com with ESMTP id 2hxpvcpqja-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 May 2018 12:21:51 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w4FCLoWa006537 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 May 2018 12:21:50 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w4FCLmCc028380; Tue, 15 May 2018 12:21:49 GMT Received: from mwanda (/197.254.35.146) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 May 2018 05:21:48 -0700 Date: Tue, 15 May 2018 15:21:39 +0300 From: Dan Carpenter To: Stephen Hemminger Cc: Dexuan Cui , "olaf@aepfle.de" , Stephen Hemminger , "kys@linuxonhyperv.com" , "gregkh@linuxfoundation.org" , "jasowang@redhat.com" , "linux-kernel@vger.kernel.org" , "Michael Kelley (EOSG)" , "apw@canonical.com" , "devel@linuxdriverproject.org" , "vkuznets@redhat.com" Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: enable VMBus protocol version 5.0 Message-ID: <20180515122139.x6xmxol4iutaqys6@mwanda> References: <20180512093033.12325-1-kys@linuxonhyperv.com> <20180513102409.4adc5200@xeon-e3> <20180514111755.371d1d46@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180514111755.371d1d46@xeon-e3> User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8893 signatures=668698 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-1711220000 definitions=main-1805150129 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 14, 2018 at 11:17:55AM -0700, Stephen Hemminger wrote: > On Mon, 14 May 2018 18:14:15 +0000 > Dexuan Cui wrote: > > > > From: devel On Behalf Of > > > Stephen Hemminger > > > Sent: Sunday, May 13, 2018 10:24 > > > > ... > > > > @@ -372,6 +400,18 @@ int vmbus_post_msg(void *buffer, size_t buflen, > > > bool can_sleep) > > > > ... > > > > + hdr = (struct vmbus_channel_message_header *)buffer; > > > > > > Hate to pick o the details, but buffer is void * so cast is not necessary here. > > > > Yes, it's unnecessary in C, though it's necessary in C++. > > > > I found the patch went into char-misc 4 hours ago, so it looks we may > > as well leave it as is. IMHO an explicit cast is not a bad thing. :-) > > > > Thanks, > > -- Dexuan > > Kernel developers like to be concise. In fact there is a smatch script that perodically > gets run and more cleanup patches get sent. It's a Coccinelle script, not Smatch. Coccinelle generates patches automatically so it's a better tool for cleanup than Smatch. I would generate a lot more Smatch information if there was a way to integrate it easily into a code editor. For example, we could highlight unecessary casts or pointer dereferences where Smatch wasn't 100% sure if it was correct. Or you could hover over function name to see what resources it allocates. regards, dan carpenter