From patchwork Tue Apr 24 12:06:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 134067 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2150698lji; Tue, 24 Apr 2018 05:07:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/715LlxFNL6WjpoxxybYiL7Cm+pB9bdqLMiB7zyjO6asVAk7feBrIUb8GSFOy7kWD9NSMN X-Received: by 10.99.124.72 with SMTP id l8mr15596109pgn.420.1524571658221; Tue, 24 Apr 2018 05:07:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524571658; cv=none; d=google.com; s=arc-20160816; b=SAIm1PBlD4kDwX+x/gIPpwH/PdxxevOaIx4YdhJuSFkM1oakuZHGOMnw/i1tj+OZ6U TK333iQk832NAUxo+0XDryMOlctKeBp2oo/lxlfk0CuclYEWe81+sXPfG4GydCCMpKRu 11r5zkuFgI1mNdiRc5VLpjUII/SiIiysozRULCgm+M2wbK0IxbRtfWDrxTFm+yrGXK9K Xgioc2DyxRrQ63Z4WOdkW92lMNC3kFK6+RVMCBrTO1ZzZrEw/tIScyXnn6VwHvWue/7p tFY22i5pdpz/V4WSLzFeHDVLz0GU4skvhA52pF1IpqG23BzgT0qjbYdlvCPqotJdlxu6 i1Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=vUyTPQbeeV5LPYBWuuFi98dtmXZHDhJSABAC2yF64hU=; b=bRKUJVJ6ebCLOfufeN99aINhMW8bRGej5DU1m33OBbu0cGYZYubCd7hF794NZ6apAA wtEMJTUmWEE2PT2H789IaXhugwzmlDsAqY8os6sf+tPrTIj2dDpVH+/hn7dKW82+MpYf c7lPRwN7IWzAeHYXz0eQB/9DN5PCJABfYBFRTM086NacVeftDEGNueD78SW+MMam4dqg h/SNURi4y6pezNR1dVJWDe6p5szVWQLbdG5fqepCZ7/MDESWfd0262gGLa+9KYZUItIJ ob0cWodDSIdXxC6O2fGZs16fxEtjPfpFSoX0rYJHumgezGZ9+h9accjSHTUU8GpumNh3 XGvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JmhJu2Sy; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5si10902344pgu.158.2018.04.24.05.07.36; Tue, 24 Apr 2018 05:07:38 -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=@linaro.org header.s=google header.b=JmhJu2Sy; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932580AbeDXMHe (ORCPT + 29 others); Tue, 24 Apr 2018 08:07:34 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:35380 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756988AbeDXMH3 (ORCPT ); Tue, 24 Apr 2018 08:07:29 -0400 Received: by mail-pg0-f65.google.com with SMTP id j11so10722477pgf.2 for ; Tue, 24 Apr 2018 05:07:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=vUyTPQbeeV5LPYBWuuFi98dtmXZHDhJSABAC2yF64hU=; b=JmhJu2SyxWmLE9XiGbtmaDXnVLGDjaC2ZSUBRfYNhG3JntPGeuo0Rpca4h16HGW50L 8fhxl9DttyYKBPd/tdc4h6n/7KQg3jnEnVFJmOrbp4Q1i97ynYsMZNUqKx0CIZZOr8oD W+z+CkhQhdtWOdrarioirhNAOBWkcm2kh+iMc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=vUyTPQbeeV5LPYBWuuFi98dtmXZHDhJSABAC2yF64hU=; b=uSXgIyvcG828fpc8bkQpZgJHqBDxZdWqvrbfcTsvOYYiv6PxAWd5FnkZ9I8Lv/RFCF XGaFa7Qtsu5PvREWn4CwymEz+PwbX0mY/on2C3TdZhW0NshZH5LJizCFRi4S5kX2leRb JzubEhBlQmNdN/UvMlhzn/LQi7zZl0xM9cYb5aWZpXWWVS/TtaybmuH7+E2Ouak1BCyo 16/c0Vp95UcsAP5A1TkrsFAgCqtJSjspmXwISENOrcFA/A+MLAWNJ8BELwbYwTQ7tIjr 884FAFXU84oWiTWc/qDB9DLhyz/ZNxGHuLnMROdgSngZChXUYgN6eM3xXq9IDaDB31qh sbNg== X-Gm-Message-State: ALQs6tBz6XFoUvZOhh2xaAtL+vq/Ce20QRUZMMwKu3VZcHfcZBXRwM40 Q/mOU7mg85sER0x1O9P2MfrjDQ== X-Received: by 2002:a17:902:14cb:: with SMTP id y11-v6mr24705422plg.23.1524571648819; Tue, 24 Apr 2018 05:07:28 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id c7sm46350567pfg.81.2018.04.24.05.07.23 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Apr 2018 05:07:28 -0700 (PDT) From: Baolin Wang To: perex@perex.cz, tiwai@suse.com, arnd@arndb.de Cc: baolin.wang@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, o-takashi@sakamocchi.jp, mingo@kernel.org, elfring@users.sourceforge.net, dan.carpenter@oracle.com, jeeja.kp@intel.com, vinod.koul@intel.com, guneshwor.o.singh@intel.com, subhransu.s.prusty@intel.com, bhumirks@gmail.com, gudishax.kranthikumar@intel.com, naveen.m@intel.com, hardik.t.shah@intel.com, arvind.yadav.cs@gmail.com, fabf@skynet.be, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/8] ALSA: Avoid using timespec for struct snd_ctl_elem_value Date: Tue, 24 Apr 2018 20:06:10 +0800 Message-Id: <33f88d93c2330a17c50c51f1d0e7742f4d27c12a.1524570852.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The struct snd_ctl_elem_value will use 'timespec' type variables to record timestamp, which is not year 2038 safe on 32bits system. Since there are no drivers will implemented the tstamp member of the struct snd_ctl_elem_value, and also the stucture size will not be changed if we change timespec to s64 for tstamp member of struct snd_ctl_elem_value. >From Takashi's comments, "In the library, applications are not expected to access to this structure directly. The applications get opaque pointer to the structure and must use any control APIs to operate it. Actually the library produce no API to handle 'struct snd_ctl_elem_value.tstamp'. This means that we can drop this member from alsa-lib without decline of functionality." Thus we can simply remove the tstamp member to avoid using the type which is not year 2038 safe on 32bits system. Signed-off-by: Baolin Wang --- include/uapi/sound/asound.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 1.7.9.5 diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h index ed0a120..1231f0a 100644 --- a/include/uapi/sound/asound.h +++ b/include/uapi/sound/asound.h @@ -954,8 +954,7 @@ struct snd_ctl_elem_value { } bytes; struct snd_aes_iec958 iec958; } value; /* RO */ - struct timespec tstamp; - unsigned char reserved[128-sizeof(struct timespec)]; + unsigned char reserved[128]; }; struct snd_ctl_tlv {