Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5085490ybv; Mon, 17 Feb 2020 11:57:36 -0800 (PST) X-Google-Smtp-Source: APXvYqwMGwet0R2KlVPFLUFOorKSrgV5vpgBDLHPe76A1QnO6XOVfM2KaLCEU5AV1+qrEc+LBQgQ X-Received: by 2002:aca:ebcb:: with SMTP id j194mr430314oih.154.1581969456720; Mon, 17 Feb 2020 11:57:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581969456; cv=none; d=google.com; s=arc-20160816; b=06PZ9eDPgS/0SSuLWU6H/pBqtA6Bbj+4KPcx2Aly9FOXij4m7Wh4ylOJPzXfLcy1BR CAIXE8l4Kyd9C9QkYaV4pDVC+xsaf5rCkYy9eZ7JCgADW7tbCtkPUDFWgtExq0hr1Drj mhSk3fJoYodAMw1r3R3/9Io0l02hbSW+6rPL238n8mQ7zw0sNKCi9fMaP0cEjOoj91Ob RtxuSMOzv/miHlR01JhBQALoCzVzXdQrJ6lyIwgEevjo+CMMHAvON0NVHzTfjcXF+Vyj oDnclDOPTjIOVSfMc5zo9VNSSB080g4T5XEbUlqDD/OtTIvKRcO2dJo3xcW4ZyPYg7Bl bqTQ== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=TkZflMcROFsesKUNZV7osOthh1cZ+d/gpsuqXa9C5l8=; b=memQcaprP+oPzB558lTInsZcI/C9MYZAkzFuMBU8W0cYJNsrMp5jUszjsTlFFO4t0X hNMu95/NMOGNWm0NkTBBJH+15F6AlG+xj29eOr9OBamxk+Np2F25/Mu6cK1SDpx894Dm 1WYToJhXiXZ4KAhs+p5zDKUp3GE7QIgmIGlpYRdVss68FmcY2fKgHpXsHxdYC1B0sonM 8tcEB0fTt3Nz97LGVyQo7hwP5ZNtDquH/z04EywgHD7nVd0sHJXV2XpwWT5XGfHDbDN4 i6DPRPlXWwD4gKqbFAGWdlAGAapnMEHEMBCqRIYIWrtS1B4Vz2ze/jzFBfWM2zspeSBr gPyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=IomMbbbR; 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 f28si644439otc.110.2020.02.17.11.57.25; Mon, 17 Feb 2020 11:57:36 -0800 (PST) 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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=IomMbbbR; 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 S1729699AbgBQT5H (ORCPT + 99 others); Mon, 17 Feb 2020 14:57:07 -0500 Received: from mail-io1-f66.google.com ([209.85.166.66]:40745 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727332AbgBQT5G (ORCPT ); Mon, 17 Feb 2020 14:57:06 -0500 Received: by mail-io1-f66.google.com with SMTP id x1so8282518iop.7 for ; Mon, 17 Feb 2020 11:57:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=TkZflMcROFsesKUNZV7osOthh1cZ+d/gpsuqXa9C5l8=; b=IomMbbbRUB6peFoBopVRcXZLp+v3pwqHiFwJ+zz3CgTCHpx/ai31KvJpxUqNFwEDFA bnw2mKddqNteZD0xJFZhKEhKqOUEI8hZ/f5A1qNkzC4McjYBmk4xSXsiafGysyUT1uz7 4Zoy9khoSb8MKmU8VUUQUvpBwTn8voe//r0Lnt/GCwfaaqGQeQh5N15h24UyKQ9ThfKL nAyJa3Vlu/E10SAXcfE4FLVgij+VgoHwNytOQM+DUDqiMw37E7wHDMHS0xonbidfmDAu Me0t2Q6/lytOjYIvf5Q7gzefC/3D/szDoZh2yQvlXvLEL6R7pRLuQuXzN0kZDZG2KGiu E7ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=TkZflMcROFsesKUNZV7osOthh1cZ+d/gpsuqXa9C5l8=; b=lwTNfSYvsjigCi8DfayB42tDIlDuul0GMz96zSuD6uiMGswBoqfOe9Ox0OWQT43Ako UU3zg+gAw69q0bj9fr8aT2uzqD7aoFIhvEC2QQZTFTL5yf6E0z/XwgqWA8dsPzxPR4j7 GrY5jlhmTPtKwCgCgqkrlk4/Nn+apCsU3XFmJfI1zqTpPjU9QG/uev//dFhnn/ycUd87 i9tFiJhRb5FRShk1D24vwgGat0FQHfpEELONNBNuwKViHVItUZnLf/9GS8x1debY4NGi U/o0SJHaZuI/zL6pHqICUQlV8ZY9w1zMXsr75SbsM+2U5jzUgwhhBEAm/4QoPsNhwquc OwUA== X-Gm-Message-State: APjAAAXG4pFVrdlzsBxsIc9AhEVoP0QoY3P5QoxQbSJ6hQh2huOHg3Pf h4kPkR3P8teVHCFCubxQyO6raQbWkYDtGikenJIiDA== X-Received: by 2002:a05:6602:2352:: with SMTP id r18mr12638053iot.220.1581969425784; Mon, 17 Feb 2020 11:57:05 -0800 (PST) MIME-Version: 1.0 References: <20200217195435.9309-1-brgl@bgdev.pl> In-Reply-To: <20200217195435.9309-1-brgl@bgdev.pl> From: Bartosz Golaszewski Date: Mon, 17 Feb 2020 20:56:55 +0100 Message-ID: Subject: Re: [PATCH 0/6] nvmem/gpio: fix resource management To: Linus Walleij , Srinivas Kandagatla , Khouloud Touil , Geert Uytterhoeven Cc: "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pon., 17 lut 2020 o 20:54 Bartosz Golaszewski napisa=C5=82(= a): > > From: Bartosz Golaszewski > > This series addresses a couple problems with memory management in nvmem > core. We fix an earlier memory leak in error path in patch 2/6. Patches > 1/6, 5/6 & 6/6 add reference counting to gpio_desc structure and use it > to correctly free the write-protect GPIO. Patches 3/6 & 4/6 fix newline > problems. > > Bartosz Golaszewski (5): > gpiolib: use kref in gpio_desc > nvmem: fix memory leak in error path > nvmem: remove a stray newline in nvmem_register() > nvmem: add a newline for readability > nvmem: increase the reference count of a gpio passed over config > > Khouloud Touil (1): > nvmem: release the write-protect pin > > drivers/gpio/gpiolib.c | 26 +++++++++++++++++++++++--- > drivers/gpio/gpiolib.h | 1 + > drivers/nvmem/core.c | 14 ++++++++++---- > include/linux/gpio/consumer.h | 1 + > 4 files changed, 35 insertions(+), 7 deletions(-) > > -- > 2.25.0 > Cc'ing Geert - sorry I forgot you when submitting this. Bartosz