Skip to content

Commit d81c041

Browse files
quic-lxu5gregkh
authored andcommitted
misc: fastrpc: Remove kernel-side domain checks from capability ioctl
Domain ID in the uAPI is misleading. Remove checks and log messages related to 'domain' field in capability structure. Update UAPI to mark the field as unused. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Reviewed-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com> Signed-off-by: Ling Xu <quic_lxu5@quicinc.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://lore.kernel.org/r/20250912131302.303199-3-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8de0848 commit d81c041

2 files changed

Lines changed: 2 additions & 14 deletions

File tree

drivers/misc/fastrpc.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,7 +1723,6 @@ static int fastrpc_get_info_from_kernel(struct fastrpc_ioctl_capability *cap,
17231723
uint32_t attribute_id = cap->attribute_id;
17241724
uint32_t *dsp_attributes;
17251725
unsigned long flags;
1726-
uint32_t domain = cap->domain;
17271726
int err;
17281727

17291728
spin_lock_irqsave(&cctx->lock, flags);
@@ -1741,7 +1740,7 @@ static int fastrpc_get_info_from_kernel(struct fastrpc_ioctl_capability *cap,
17411740
err = fastrpc_get_info_from_dsp(fl, dsp_attributes, FASTRPC_MAX_DSP_ATTRIBUTES);
17421741
if (err == DSP_UNSUPPORTED_API) {
17431742
dev_info(&cctx->rpdev->dev,
1744-
"Warning: DSP capabilities not supported on domain: %d\n", domain);
1743+
"Warning: DSP capabilities not supported\n");
17451744
kfree(dsp_attributes);
17461745
return -EOPNOTSUPP;
17471746
} else if (err) {
@@ -1769,17 +1768,6 @@ static int fastrpc_get_dsp_info(struct fastrpc_user *fl, char __user *argp)
17691768
return -EFAULT;
17701769

17711770
cap.capability = 0;
1772-
if (cap.domain >= FASTRPC_DEV_MAX) {
1773-
dev_err(&fl->cctx->rpdev->dev, "Error: Invalid domain id:%d, err:%d\n",
1774-
cap.domain, err);
1775-
return -ECHRNG;
1776-
}
1777-
1778-
/* Fastrpc Capablities does not support modem domain */
1779-
if (cap.domain == MDSP_DOMAIN_ID) {
1780-
dev_err(&fl->cctx->rpdev->dev, "Error: modem not supported %d\n", err);
1781-
return -ECHRNG;
1782-
}
17831771

17841772
if (cap.attribute_id >= FASTRPC_MAX_DSP_ATTRIBUTES) {
17851773
dev_err(&fl->cctx->rpdev->dev, "Error: invalid attribute: %d, err: %d\n",

include/uapi/misc/fastrpc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ struct fastrpc_mem_unmap {
134134
};
135135

136136
struct fastrpc_ioctl_capability {
137-
__u32 domain;
137+
__u32 unused; /* deprecated, ignored by the kernel */
138138
__u32 attribute_id;
139139
__u32 capability; /* dsp capability */
140140
__u32 reserved[4];

0 commit comments

Comments
 (0)