Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1836091rwn; Fri, 9 Sep 2022 05:00:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR5749Sy5Wo5CevzV/ffE19WGlBIdPqIG6U0XQrL2orgFS3vDm1r7SLSQzYHFU0wPqq8P38z X-Received: by 2002:a05:6a00:248a:b0:538:690e:fdbc with SMTP id c10-20020a056a00248a00b00538690efdbcmr13849257pfv.47.1662724847936; Fri, 09 Sep 2022 05:00:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662724847; cv=none; d=google.com; s=arc-20160816; b=U6Tzy0AOsmUBIjp4VGOZ1MXFenD07TuVnuZViYq1oT/cVe7I/AvtgNGboVveVHpbeH rKwheZQteCI+rh4tJTMQ+Aw7rZq4NneSbxJmrYvrarwfWxYa10vfwWDaAYs3zj0oeTU9 5NvASWyABwZk0jRKmBbOCx+aR/FqDY05Uh1wBlF0+gObX7xTkPXxPafHxRbgtdDnQCFr x+j890jRTmKopdo1N7nHE/XE8eAi2Jtw7Vf2lKDJyEWTMx3vx8mfIQp2RTJh006/+lSM YcMTV5Lj97JK1K7/mfJXlIbqsGRXXs3QrDAigDxOjiZq/7915FDB0xJkDqCP4OS/xR7N LY7A== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=abVU/lXZkj0CQ3t3xspMgFafVB111VJets+EvHJza70=; b=NwwEmVB9qmleIyRG/ugLPY1m6395GbyaqBj4PKSBIYAsnBW+H285Wu6H1fEnSfKxPF JWyKpX69kpNEXqtsgqRtGyaNL3lkpR0C33gGzB96DB3Iet+JjZ0UhouWKT60OySv+u5S OHFbT/DKAujheSGAQ49b2ovj/zGGIki1AbqwFkU5gVP2GaBJyYMo1I33skvKij3yxzu/ P54kRLzyShYDIYC1OFs2QWGTVPeqqwDd0AhkOHNiMrK8Q1UoAY60Tl4c0i1cS7Kf60re UR7NlHDibqCbA1DWJeSy7f9N84BvRh3GPUxwuQpJbBlluS/77Am/WDxYPQ1BWlZzofhA UCsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=I0V48tMf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k10-20020a63d84a000000b0042bf6bcaaa5si377959pgj.395.2022.09.09.05.00.33; Fri, 09 Sep 2022 05:00:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=I0V48tMf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230447AbiIILrQ (ORCPT + 99 others); Fri, 9 Sep 2022 07:47:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230004AbiIILrO (ORCPT ); Fri, 9 Sep 2022 07:47:14 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5738B131EDC for ; Fri, 9 Sep 2022 04:47:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 172F7B82489 for ; Fri, 9 Sep 2022 11:47:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F6A1C433C1; Fri, 9 Sep 2022 11:47:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662724030; bh=7suUxrvFUF/KkgYl83T/YM3TrdL0T05prCH6RXiZcy4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=I0V48tMfmGxxXD/VutHGMHHJIEBJr3cTGkIGnEknRHdMsUKhguNcNjuFNV/1yntaI L3xJ6WdNg2DZvndCZiL4QNSY0lQmkPhPUj8YFnkcKVU0XoA284rkDv6RoTRPpx9SBR 2YbIlpLK188RZ0y2bbDl+iXp/7OZvPJeYX0AxvAM= Date: Fri, 9 Sep 2022 13:47:26 +0200 From: Greg KH To: Nam Cao Cc: forest@alittletooquiet.net, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Subject: Re: [PATCH v2] staging: vt6655: use memset to make code clearer Message-ID: References: <20220909090856.18427-1-namcaov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Fri, Sep 09, 2022 at 01:29:44PM +0200, Nam Cao wrote: > On Fri, Sep 9, 2022 at 12:23 PM Greg KH wrote: > > Why do you have to cast this to (void *)? That should almost never be > > needed. > > Because I want to suppress a compiler warning: > drivers/staging/vt6655/device_main.c:869:9: warning: passing argument > 1 of ‘memset’ discards ‘volatile’ qualifier from pointer target type > [-Wdiscarded-qualifiers] > 869 | memset(&rd->rd0, 0, sizeof(rd->rd0)); > | ^~~~~~~~ Why would that have a type of "volatile"? That should be fixed first please. thanks, greg k-h