Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3218147rwb; Mon, 7 Aug 2023 09:54:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHs7d0bX9+asl53H+b3dTOPDioWrjYqrar528bCf5XgtIM+Pm0PJpdMipDAkcYZThZ35/p7 X-Received: by 2002:a17:902:d2cb:b0:1bc:239:a7ec with SMTP id n11-20020a170902d2cb00b001bc0239a7ecmr11032760plc.65.1691427289963; Mon, 07 Aug 2023 09:54:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691427289; cv=none; d=google.com; s=arc-20160816; b=FYZR0v6HV5xSvypqv4np0fPJCu3gtDICcBsq53GhUeFAM7C9zRjgLVuWjOGRi6I8qi j8VLlqUUfQrIWWMKGn3hlBZzlkyqYg3MFv3HioJbhQA5lH3pjB0UXTJyGWdceX3jmIZn rME8RTZwteljBkIswblGWU+KUDe8bt24b+vYpnxz2lEhRC2A4MKl7UvScY4FXZO0qk8Q UmmMlesozduQzr/CHq3siQ/mdrw44bV6/4gAwk5PDuv5GbZs2lOcl/igbL11lHG0xvrS /EERMEz+e+TcjcE5RqNf0AccNLu4ft3T2LqkLuZNJOUkmgEvtiykfwLJApgymy4lA4q8 E8EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=fywVO3lf7mQtJxXDySZPqv0vkHYL4Ucsl/1T7KbfFw0=; fh=o2BwiJTiEjZ24Md7GcsvwH96itozCGGEa9b3EYcQ70U=; b=tzo64P1YOCLnF5CPzgErb6VG8WQr4ob0tNseStuORD0CI8FnyjpuCdGaG8kyPSvGrV MItqVvMPGf2zrLgsiPkSwYQ6q4HGnK8Dpz7Cy0rQ0Fc9tKmVUCEFS/ZOrUw9uouWCuWD gPw5JFtB/vZxSAhi0U8haFFtw5R3qPKeD2T3jnnHHuA2k30OAg0RuKrcMtYNTR8Hzbx5 wPO2ea0aJwRC8cYUkjD5J65TEtxQ35s0aDxgIoKjsTtdz/gMxRvuzcp4sQ3MDC07n4BM McPkMIYwjXYNeihK9/2GB9g40PEgHvrecyHoLC6AqSHKs7WVuDNPSK+amaqUDnlQcqbs b0Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YEEAhG6F; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m12-20020a170902e40c00b001bbcc4e0211si3244856ple.239.2023.08.07.09.54.37; Mon, 07 Aug 2023 09:54:49 -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=@linaro.org header.s=google header.b=YEEAhG6F; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231367AbjHGPwB (ORCPT + 99 others); Mon, 7 Aug 2023 11:52:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231361AbjHGPv6 (ORCPT ); Mon, 7 Aug 2023 11:51:58 -0400 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E0D6171A for ; Mon, 7 Aug 2023 08:51:54 -0700 (PDT) Received: by mail-yb1-xb36.google.com with SMTP id 3f1490d57ef6-ccc462deca6so5132282276.0 for ; Mon, 07 Aug 2023 08:51:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691423513; x=1692028313; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fywVO3lf7mQtJxXDySZPqv0vkHYL4Ucsl/1T7KbfFw0=; b=YEEAhG6FfOCvgKllcbCs6rN8SsxbA/TeCFqwQuVfthmEHVcho1S5Pd5mSLN+6tXv5V 1FJlibgt3ADfPmZsQ5F8EpJybfTs8SQaAHpx4OAk8BfAb4JV0Bkn/fTO+GHumm/tTR7W YPNp85lAGLnuf/oE8KpRs0Sxgf+mPuNz1owr4PFuZZ7RvuZIryqy93ywQmJ1R8SrP8JK KhMObsY9SqtnDdSXZnWtNkoBH8/fuyJhr6FVJvtCkKzAunqOppCVJUP31bWfONFqdYBG AD0pR3U5e2hdDEBAmsCprvLAR6M4d8otzYVbdQJikpG+uvMZVlu/SZPg1OEvKUeM7vMT n8dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691423513; x=1692028313; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fywVO3lf7mQtJxXDySZPqv0vkHYL4Ucsl/1T7KbfFw0=; b=ePK9i1lCJauTXlQs9HAQvZ/sPfunUf9YSdmiNlZ1tqhu9kg7KQtrtjvWUm9AsBjm9B x6qHhdraoaP4NlRc+7pRJu4CxuMx2zqtPUi5ORnXRZeECB8rci+ZM79swmgusrBzt7eu 4SDJ4typL+wHqZCpcOagSmDVox0GAZIHhZRG27jh0t1QDc7YiwQ4JZMUFde25XG3gshU oMWritxBxK6y/eOpfyFzjUkw6tKUUvuvQ31Fk3SvZw19n5mF6rirebqJq2Lr0TQU+jvL FFQ+mHjUSGsZpFNxFGgAPcqkQosLXIGrgXJGd4IVszGK/+sPB/7tpH/fy5mX2oSYHN0h HM0w== X-Gm-Message-State: AOJu0YyGauqPcZAPqBeQXpU9Cnql6vNsy2cGVY2CSexQUF639ZBnci2t kSlW6epr0u9+yUojUsaLAgRYNDDzKgEbCfAOuVNBJYp2nCY7xHWO X-Received: by 2002:a25:d1d2:0:b0:d3c:932b:806f with SMTP id i201-20020a25d1d2000000b00d3c932b806fmr9771257ybg.43.1691423513649; Mon, 07 Aug 2023 08:51:53 -0700 (PDT) MIME-Version: 1.0 References: <20230725-mmc-removable-v1-1-b2e0c4f18e6d@weissschuh.net> In-Reply-To: <20230725-mmc-removable-v1-1-b2e0c4f18e6d@weissschuh.net> From: Ulf Hansson Date: Mon, 7 Aug 2023 17:51:17 +0200 Message-ID: Subject: Re: [PATCH] mmc: core: propagate removable attribute to driver core To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Tue, 25 Jul 2023 at 16:17, Thomas Wei=C3=9Fschuh = wrote: > > Userspace can use this to distinguish hotpluggable mmc devices such as > sdcards from non-hotpluggable ones such as eMMC. > One example is the lsblk tool from util-linux. > > Note that dev_set_removable() is not related to GENHD_FL_REMOVABLE which > is not applicable as per the comment in drivers/mmc/core/block.c > > Link: https://github.com/util-linux/util-linux/issues/2379 > Signed-off-by: Thomas Wei=C3=9Fschuh Applied for next, thanks! Kind regards Uffe > --- > drivers/mmc/core/bus.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c > index 2c3074a605fc..0af96548e7da 100644 > --- a/drivers/mmc/core/bus.c > +++ b/drivers/mmc/core/bus.c > @@ -310,6 +310,9 @@ int mmc_add_card(struct mmc_card *card) > > > dev_set_name(&card->dev, "%s:%04x", mmc_hostname(card->host), car= d->rca); > + dev_set_removable(&card->dev, > + mmc_card_is_removable(card->host) ? > + DEVICE_REMOVABLE : DEVICE_FIXED); > > switch (card->type) { > case MMC_TYPE_MMC: > > --- > base-commit: 0b5547c51827e053cc754db47d3ec3e6c2c451d2 > change-id: 20230725-mmc-removable-5cfdca9ed062 > > Best regards, > -- > Thomas Wei=C3=9Fschuh >