From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2057C3A59B for ; Sat, 17 Aug 2019 15:59:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B72E62086C for ; Sat, 17 Aug 2019 15:59:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cbCTvjIB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726089AbfHQP7b (ORCPT ); Sat, 17 Aug 2019 11:59:31 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:46143 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726013AbfHQP7b (ORCPT ); Sat, 17 Aug 2019 11:59:31 -0400 Received: by mail-pg1-f195.google.com with SMTP id m3so3864463pgv.13; Sat, 17 Aug 2019 08:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xIlhVyHBmb3rcCp+KzrwcLo7a20Ei5NLFLjc/pDseU0=; b=cbCTvjIBVb+wS7VLXUoKpVlN88AtzcWy+XNBk1e3ABUE1OyesQ6KdJ8vfYqmtMnIPC BLSK0/1+8k7+BLIHnS8oP6QYJ8UUTzAdilvpCb3MGsDYO18De6mJ/AWTvtGIolUiABY/ 6azsDVWEoSfqXRdCCiMjaoT1az8eRdMuBk8qt3/SS+TiHIkUO7HXWheQo6tVbRrwBCJf jUSE/AvYDrDIIfnhYZZX/3cxvrf99p1VQZ7GVhV/euYQcWqI8OQE5InvtGbR7l9uF8/6 +x9a5dzFh4TZZx9iEugr/QJMMmcgOuYAwrrPHTC863JGtn10RloPL0tex6eoAqgWeP9s HdoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xIlhVyHBmb3rcCp+KzrwcLo7a20Ei5NLFLjc/pDseU0=; b=hiEaxg47gVMef+mM60i/A1iU1pUJHQ+M4UR95TGibRpTVDtSY2zFBlsD2pDCrFQkkw hiTALTHlxawM8jI4BX/IbsBmRFQhqqsWIKzD8PEdyTnQFsHZz3N4/hwCAITQ+3I94T5k 3bU2omhCkQlIAQA0GGSY2O0KmdoAD4JY75p7clYBCUQ/Qz8uwKmjGFX/Cj5lj9S10+Vl kgggmOiKx3ipl2/4KJztoorrT/SeGlkRuW3MvmDbPZKehTbAm6R5K3xLG1lwa+AkaQTR PGKoAKWYAHBnlTpeBTtcJ/nAo8yRfJge739KLF/owX7JAUruTaPhqBFWkCtoiUlZyeSZ hItg== X-Gm-Message-State: APjAAAXIAT0jh5GjK1FTdPyV+V7C86MFgVkSA0a7NXWkcGuaWEXKeY4M wFA1UDYQ40MQE6Y/jpEEifs= X-Google-Smtp-Source: APXvYqx729u4HAZJtk7rY2vqxpnYL8YoY7lKPmX9QdvNVhy7BLwnYGYevQ3WBAFQhnIpcAwTBs+glQ== X-Received: by 2002:a62:e806:: with SMTP id c6mr16431028pfi.132.1566057570572; Sat, 17 Aug 2019 08:59:30 -0700 (PDT) Received: from localhost (c-73-222-71-142.hsd1.ca.comcast.net. [73.222.71.142]) by smtp.gmail.com with ESMTPSA id n128sm9486232pfn.46.2019.08.17.08.59.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Aug 2019 08:59:29 -0700 (PDT) Date: Sat, 17 Aug 2019 08:59:27 -0700 From: Richard Cochran To: Felipe Balbi Cc: Christopher S Hall , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] PTP: introduce new versions of IOCTLs Message-ID: <20190817155927.GA1540@localhost> References: <20190814074712.10684-1-felipe.balbi@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190814074712.10684-1-felipe.balbi@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Aug 14, 2019 at 10:47:11AM +0300, Felipe Balbi wrote: > The current version of the IOCTL have a small problem which prevents us > from extending the API by making use of reserved fields. In these new > IOCTLs, we are now making sure that flags and rsv fields are zero which > will allow us to extend the API in the future. > > Signed-off-by: Felipe Balbi > --- > drivers/ptp/ptp_chardev.c | 58 ++++++++++++++++++++++++++++++++-- > include/uapi/linux/ptp_clock.h | 12 +++++++ > 2 files changed, 68 insertions(+), 2 deletions(-) > > diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c > index 18ffe449efdf..204212fc3f8c 100644 > --- a/drivers/ptp/ptp_chardev.c > +++ b/drivers/ptp/ptp_chardev.c > @@ -123,9 +123,11 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg) > struct timespec64 ts; > int enable, err = 0; > > + memset(&req, 0, sizeof(req)); Nit: please leave a blank line between memset() and switch/case. > switch (cmd) { > > case PTP_CLOCK_GETCAPS: > + case PTP_CLOCK_GETCAPS2: > memset(&caps, 0, sizeof(caps)); > caps.max_adj = ptp->info->max_adj; > caps.n_alarm = ptp->info->n_alarm; Reviewed-by: Richard Cochran