Received: by 10.223.164.221 with SMTP id h29csp408724wrb; Tue, 24 Oct 2017 02:42:27 -0700 (PDT) X-Received: by 10.98.24.20 with SMTP id 20mr16088099pfy.71.1508838147059; Tue, 24 Oct 2017 02:42:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508838147; cv=none; d=google.com; s=arc-20160816; b=WBRnIZkuLVmjXIt/WeRhXsDdA2+t+bbvZNbgH1dT19FMMZ+6j7Mv2DkopwWbcBVy0U b62YLp6AQuFH858OrIZIZFJmXCZakEQKVVWFHK2BdGvdp9Cj4cImXe9J4U6qGF9opPtF L9yAhh6N/XG4HFU/OXyA7BRt7is8xd0w9C49SkTS3p0TVV6yZLBMdztBSKjynl/Nqv9Z iKWNqkwq/dtpQLMBY/j+jsJATwofwYsEY88Vo4uVRTTJNT2+tOC3zja2SZy0DgacUJmM ECNB4t964J/z0pJQG11cqydaSg5XU+zy8qtvUYT8p1mZDjQqAKpBLC5kjdIkomn8l5iI Sddg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature :arc-authentication-results; bh=jZ58X61CSrzbqGw5xjIHUOmpI+7lJ6f4fVWVFKN9jSw=; b=q7hYDtnPVeh/ZhkVqCDBWHjxcyut8rwGMSID4bUecWoUVHfMb5n8lXdPlusQacxkBO VerCBBdCIufnTJ1aAgRkjP8Z06u7RnvAYZ5RW7SUP+9Q/rqEEfjBnJhrYO7miPI76Kfr oUExgNibWSqjl7eSobLMyETAKPDVvSC9ecSqNUvC1fCDZ1CYhV67uXkLLKLSSgrZTh6C RZuXY3tZ9wH2w+tAO+DYIKFN0EldLIk8XCZkaCEuRf3zhzomyTVrD7MLg/Yyo5X/mdo1 TK+dm+AOicdBElhdPkdEy8DopkSCZ/BqwojMRdCF0OV90jrakz3rEl4iwB5Z4ud5na9F qVhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nexus-software-ie.20150623.gappssmtp.com header.s=20150623 header.b=Qw/cAGSR; 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 72si5165844pld.794.2017.10.24.02.42.12; Tue, 24 Oct 2017 02:42:27 -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=@nexus-software-ie.20150623.gappssmtp.com header.s=20150623 header.b=Qw/cAGSR; 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 S1752056AbdJXJkg (ORCPT + 99 others); Tue, 24 Oct 2017 05:40:36 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:52483 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932241AbdJXJkc (ORCPT ); Tue, 24 Oct 2017 05:40:32 -0400 Received: by mail-wm0-f66.google.com with SMTP id 78so12096574wmb.1 for ; Tue, 24 Oct 2017 02:40:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexus-software-ie.20150623.gappssmtp.com; s=20150623; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jZ58X61CSrzbqGw5xjIHUOmpI+7lJ6f4fVWVFKN9jSw=; b=Qw/cAGSRhtPx2jhiuJ0LTniTE8BmGJPaJxblK5aiSZgQ1psCTwodRO7XWmd8lBXiDp KbncEaU+kJl5B97brc2J9aSzbTv2WIiRjA+y5A/39JfFMmbpRVyCBWLjo4/1bsOqAjLd s0ndNhKKMV4saeDJ1UfhvigG1PBOPyYfRt3fOyx2ZM5tv26ZeTf8Vk4bt5RIf18TWyRR 8Lpah1IIa7JugD/qY/TcruEXtxJyMOPt5LExK8LkcNeb+k2PUKomVIAdzUwgKkrybsdQ 2cU83VNTQcjg7kwdE8X+zm6S9Ekv2dQ5+8KVeDzksP1OlgXX/LPJ1LtG96H/EDWeP5+O Hz+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jZ58X61CSrzbqGw5xjIHUOmpI+7lJ6f4fVWVFKN9jSw=; b=uWl9aH5nhIEeLWmUZpzft+xeUShmZocYXtl13ktJJlrvmOKh9CF20xyjtHECRU6MXs eATvpozI9fcm6ph8dTg4GkREQV+e+kakAcPLJTL8JDLbWmqeADPxQklhqDIxLR/cX7PY uu3IqCSQxMDCNry8PHLflibROxk567DzuwIMHLYHtLBFhy2h0mj3hs42hGizE9s5828p M6yq4g3FQAwMqqwQuexLDjAXkYU8NzzaOT8tEudAakRrlt7zAyIzIy10xWkFFQ7X+ay/ MM7uA/jE3ixeqPlWKo+6poMCvGqExYOjZGg9AgQ4S6HRFbpjVx/hxaIzUjWY0csmsvDV EZdQ== X-Gm-Message-State: AMCzsaVkR831VdCag927H/8wDTXBvhmV1AB2ygYlQF1zYhqlG6wwsUlz JycuatSPtYX3/Z6+pO/dVKU/WuSijsA= X-Google-Smtp-Source: ABhQp+TU3JOKUE0pO+UvlcoGZoe6B3cbH39X84YvhLfSUYw3dzua7JlRbm/bzxABGK7TKjIX5bX0uQ== X-Received: by 10.80.148.118 with SMTP id q51mr19461544eda.195.1508838031119; Tue, 24 Oct 2017 02:40:31 -0700 (PDT) Received: from [192.168.192.35] ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id a5sm7847989edm.18.2017.10.24.02.40.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Oct 2017 02:40:30 -0700 (PDT) Subject: Re: [PATCH] staging: greybus: Convert timers to use timer_setup() From: Bryan O'Donoghue To: Kees Cook , Greg Kroah-Hartman Cc: Johan Hovold , Alex Elder , greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <20171024082550.GA142933@beast> <3caa07a1-4f46-d879-cfec-586addc006af@nexus-software.ie> Message-ID: <42078a19-4922-3efe-8515-99cf6296ceed@nexus-software.ie> Date: Tue, 24 Oct 2017 10:40:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <3caa07a1-4f46-d879-cfec-586addc006af@nexus-software.ie> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/10/17 10:35, Bryan O'Donoghue wrote: > On 24/10/17 09:25, Kees Cook wrote: >> In preparation for unconditionally passing the struct timer_list >> pointer to >> all timer callbacks, switch to using the new timer_setup() and >> from_timer() >> to pass the timer pointer explicitly. >> >> Cc: Greg Kroah-Hartman >> Cc: "Bryan O'Donoghue" >> Cc: Johan Hovold >> Cc: Alex Elder >> Cc: greybus-dev@lists.linaro.org >> Cc: devel@driverdev.osuosl.org >> Signed-off-by: Kees Cook >> --- >> drivers/staging/greybus/loopback.c | 14 ++++---------- >> drivers/staging/greybus/operation.c | 7 +++---- >> 2 files changed, 7 insertions(+), 14 deletions(-) >> >> diff --git a/drivers/staging/greybus/loopback.c >> b/drivers/staging/greybus/loopback.c >> index 08e255884206..045aaf81113a 100644 >> --- a/drivers/staging/greybus/loopback.c >> +++ b/drivers/staging/greybus/loopback.c >> @@ -572,16 +572,11 @@ static void >> gb_loopback_async_operation_work(struct work_struct *work) >> gb_loopback_async_operation_put(op_async); >> } >> -static void gb_loopback_async_operation_timeout(unsigned long data) >> +static void gb_loopback_async_operation_timeout(struct timer_list *t) >> { >> - struct gb_loopback_async_operation *op_async; >> - u16 id = data; >> + struct gb_loopback_async_operation *op_async = >> + from_timer(op_async, t, timer); >> - op_async = gb_loopback_operation_find(id); >> - if (!op_async) { >> - pr_err("operation %d not found - time out ?\n", id); >> - return; >> - } > > Hi Kees, you need to add > > gb_loopback_async_operation_get(op_async); when dropping the > gb_loopback_operation_find() call here. Actually: spin_lock_irqsave(&gb_dev.lock, flags); gb_loopback_async_operation_get(op_async); spin_unlock_irqrestore(&gb_dev.lock, flags); --- bod From 1582131150396021573@xxx Tue Oct 24 09:37:23 +0000 2017 X-GM-THRID: 1582126742408023281 X-Gmail-Labels: Inbox,Category Forums