Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'rpmsg-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux

Pull rpmsg updates from Bjorn Andersson:
"Mark 'data' argument in rpmsg_send() const, and perculate to related
drivers. Replace deprecated class_destroy() with class_unregister()"

* tag 'rpmsg-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
media: platform: mtk-mdp3: Constify buffer passed to mdp_vpu_sendmsg()
ASoC: qcom: Constify GPR packet being send over GPR interface
rpmsg: Constify buffer passed to send API
remoteproc: mtk_scp: Constify buffer passed to scp_send_ipi()
remoteproc: mtk_scp_ipi: Constify buffer passed to scp_ipi_send()
drivers: rpmsg: class_destroy() is deprecated

+67 -58
+1 -1
drivers/media/platform/mediatek/mdp3/mtk-mdp3-vpu.c
··· 163 163 } 164 164 165 165 static int mdp_vpu_sendmsg(struct mdp_vpu_dev *vpu, enum scp_ipi_id id, 166 - void *buf, unsigned int len) 166 + const void *buf, unsigned int len) 167 167 { 168 168 struct mdp_dev *mdp = vpu_to_mdp(vpu); 169 169 unsigned int t = MDP_VPU_MESSAGE_TIMEOUT;
+1 -1
drivers/remoteproc/mtk_scp.c
··· 1078 1078 scp_ipi_unregister(scp, id); 1079 1079 } 1080 1080 1081 - static int scp_send_ipi(struct platform_device *pdev, u32 id, void *buf, 1081 + static int scp_send_ipi(struct platform_device *pdev, u32 id, const void *buf, 1082 1082 unsigned int len, unsigned int wait) 1083 1083 { 1084 1084 struct mtk_scp *scp = platform_get_drvdata(pdev);
+1 -1
drivers/remoteproc/mtk_scp_ipi.c
··· 156 156 * 157 157 * Return: 0 if sending data successfully, -error on error. 158 158 **/ 159 - int scp_ipi_send(struct mtk_scp *scp, u32 id, void *buf, unsigned int len, 159 + int scp_ipi_send(struct mtk_scp *scp, u32 id, const void *buf, unsigned int len, 160 160 unsigned int wait) 161 161 { 162 162 struct mtk_share_obj __iomem *send_obj = scp->send_buf;
+2 -2
drivers/rpmsg/mtk_rpmsg.c
··· 135 135 kref_put(&ept->refcount, __mtk_ept_release); 136 136 } 137 137 138 - static int mtk_rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len) 138 + static int mtk_rpmsg_send(struct rpmsg_endpoint *ept, const void *data, int len) 139 139 { 140 140 struct mtk_rpmsg_rproc_subdev *mtk_subdev = 141 141 to_mtk_rpmsg_endpoint(ept)->mtk_subdev; ··· 144 144 len, 0); 145 145 } 146 146 147 - static int mtk_rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len) 147 + static int mtk_rpmsg_trysend(struct rpmsg_endpoint *ept, const void *data, int len) 148 148 { 149 149 struct mtk_rpmsg_rproc_subdev *mtk_subdev = 150 150 to_mtk_rpmsg_endpoint(ept)->mtk_subdev;
+6 -4
drivers/rpmsg/qcom_smd.c
··· 960 960 kref_put(&ept->refcount, __ept_release); 961 961 } 962 962 963 - static int qcom_smd_send(struct rpmsg_endpoint *ept, void *data, int len) 963 + static int qcom_smd_send(struct rpmsg_endpoint *ept, const void *data, int len) 964 964 { 965 965 struct qcom_smd_endpoint *qsept = to_smd_endpoint(ept); 966 966 967 967 return __qcom_smd_send(qsept->qsch, data, len, true); 968 968 } 969 969 970 - static int qcom_smd_trysend(struct rpmsg_endpoint *ept, void *data, int len) 970 + static int qcom_smd_trysend(struct rpmsg_endpoint *ept, const void *data, int len) 971 971 { 972 972 struct qcom_smd_endpoint *qsept = to_smd_endpoint(ept); 973 973 974 974 return __qcom_smd_send(qsept->qsch, data, len, false); 975 975 } 976 976 977 - static int qcom_smd_sendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst) 977 + static int qcom_smd_sendto(struct rpmsg_endpoint *ept, const void *data, int len, 978 + u32 dst) 978 979 { 979 980 struct qcom_smd_endpoint *qsept = to_smd_endpoint(ept); 980 981 981 982 return __qcom_smd_send(qsept->qsch, data, len, true); 982 983 } 983 984 984 - static int qcom_smd_trysendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst) 985 + static int qcom_smd_trysendto(struct rpmsg_endpoint *ept, const void *data, 986 + int len, u32 dst) 985 987 { 986 988 struct qcom_smd_endpoint *qsept = to_smd_endpoint(ept); 987 989
+6 -6
drivers/rpmsg/rpmsg_core.c
··· 153 153 * 154 154 * Return: 0 on success and an appropriate error value on failure. 155 155 */ 156 - int rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len) 156 + int rpmsg_send(struct rpmsg_endpoint *ept, const void *data, int len) 157 157 { 158 158 if (WARN_ON(!ept)) 159 159 return -EINVAL; ··· 182 182 * 183 183 * Return: 0 on success and an appropriate error value on failure. 184 184 */ 185 - int rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst) 185 + int rpmsg_sendto(struct rpmsg_endpoint *ept, const void *data, int len, u32 dst) 186 186 { 187 187 if (WARN_ON(!ept)) 188 188 return -EINVAL; ··· 210 210 * 211 211 * Return: 0 on success and an appropriate error value on failure. 212 212 */ 213 - int rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len) 213 + int rpmsg_trysend(struct rpmsg_endpoint *ept, const void *data, int len) 214 214 { 215 215 if (WARN_ON(!ept)) 216 216 return -EINVAL; ··· 238 238 * 239 239 * Return: 0 on success and an appropriate error value on failure. 240 240 */ 241 - int rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst) 241 + int rpmsg_trysendto(struct rpmsg_endpoint *ept, const void *data, int len, u32 dst) 242 242 { 243 243 if (WARN_ON(!ept)) 244 244 return -EINVAL; ··· 650 650 ret = bus_register(&rpmsg_bus); 651 651 if (ret) { 652 652 pr_err("failed to register rpmsg bus: %d\n", ret); 653 - class_destroy(&rpmsg_class); 653 + class_unregister(&rpmsg_class); 654 654 } 655 655 return ret; 656 656 } ··· 659 659 static void __exit rpmsg_fini(void) 660 660 { 661 661 bus_unregister(&rpmsg_bus); 662 - class_destroy(&rpmsg_class); 662 + class_unregister(&rpmsg_class); 663 663 } 664 664 module_exit(rpmsg_fini); 665 665
+4 -4
drivers/rpmsg/rpmsg_internal.h
··· 63 63 struct rpmsg_endpoint_ops { 64 64 void (*destroy_ept)(struct rpmsg_endpoint *ept); 65 65 66 - int (*send)(struct rpmsg_endpoint *ept, void *data, int len); 67 - int (*sendto)(struct rpmsg_endpoint *ept, void *data, int len, u32 dst); 66 + int (*send)(struct rpmsg_endpoint *ept, const void *data, int len); 67 + int (*sendto)(struct rpmsg_endpoint *ept, const void *data, int len, u32 dst); 68 68 69 - int (*trysend)(struct rpmsg_endpoint *ept, void *data, int len); 70 - int (*trysendto)(struct rpmsg_endpoint *ept, void *data, int len, u32 dst); 69 + int (*trysend)(struct rpmsg_endpoint *ept, const void *data, int len); 70 + int (*trysendto)(struct rpmsg_endpoint *ept, const void *data, int len, u32 dst); 71 71 __poll_t (*poll)(struct rpmsg_endpoint *ept, struct file *filp, 72 72 poll_table *wait); 73 73 int (*set_flow_control)(struct rpmsg_endpoint *ept, bool pause, u32 dst);
+13 -11
drivers/rpmsg/virtio_rpmsg_bus.c
··· 136 136 #define RPMSG_RESERVED_ADDRESSES (1024) 137 137 138 138 static void virtio_rpmsg_destroy_ept(struct rpmsg_endpoint *ept); 139 - static int virtio_rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len); 140 - static int virtio_rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len, 141 - u32 dst); 142 - static int virtio_rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len); 143 - static int virtio_rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data, 139 + static int virtio_rpmsg_send(struct rpmsg_endpoint *ept, const void *data, int len); 140 + static int virtio_rpmsg_sendto(struct rpmsg_endpoint *ept, const void *data, 141 + int len, u32 dst); 142 + static int virtio_rpmsg_trysend(struct rpmsg_endpoint *ept, const void *data, 143 + int len); 144 + static int virtio_rpmsg_trysendto(struct rpmsg_endpoint *ept, const void *data, 144 145 int len, u32 dst); 145 146 static __poll_t virtio_rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp, 146 147 poll_table *wait); ··· 491 490 */ 492 491 static int rpmsg_send_offchannel_raw(struct rpmsg_device *rpdev, 493 492 u32 src, u32 dst, 494 - void *data, int len, bool wait) 493 + const void *data, int len, bool wait) 495 494 { 496 495 struct virtio_rpmsg_channel *vch = to_virtio_rpmsg_channel(rpdev); 497 496 struct virtproc_info *vrp = vch->vrp; ··· 581 580 return err; 582 581 } 583 582 584 - static int virtio_rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len) 583 + static int virtio_rpmsg_send(struct rpmsg_endpoint *ept, const void *data, int len) 585 584 { 586 585 struct rpmsg_device *rpdev = ept->rpdev; 587 586 u32 src = ept->addr, dst = rpdev->dst; ··· 589 588 return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, true); 590 589 } 591 590 592 - static int virtio_rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len, 593 - u32 dst) 591 + static int virtio_rpmsg_sendto(struct rpmsg_endpoint *ept, const void *data, 592 + int len, u32 dst) 594 593 { 595 594 struct rpmsg_device *rpdev = ept->rpdev; 596 595 u32 src = ept->addr; ··· 598 597 return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, true); 599 598 } 600 599 601 - static int virtio_rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len) 600 + static int virtio_rpmsg_trysend(struct rpmsg_endpoint *ept, const void *data, 601 + int len) 602 602 { 603 603 struct rpmsg_device *rpdev = ept->rpdev; 604 604 u32 src = ept->addr, dst = rpdev->dst; ··· 607 605 return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, false); 608 606 } 609 607 610 - static int virtio_rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data, 608 + static int virtio_rpmsg_trysendto(struct rpmsg_endpoint *ept, const void *data, 611 609 int len, u32 dst) 612 610 { 613 611 struct rpmsg_device *rpdev = ept->rpdev;
+4 -4
drivers/soc/qcom/apr.c
··· 123 123 } 124 124 EXPORT_SYMBOL_GPL(gpr_alloc_port); 125 125 126 - static int pkt_router_send_svc_pkt(struct pkt_router_svc *svc, struct gpr_pkt *pkt) 126 + static int pkt_router_send_svc_pkt(struct pkt_router_svc *svc, const struct gpr_pkt *pkt) 127 127 { 128 128 struct packet_router *pr = svc->pr; 129 - struct gpr_hdr *hdr; 129 + const struct gpr_hdr *hdr; 130 130 unsigned long flags; 131 131 int ret; 132 132 ··· 139 139 return ret ? ret : hdr->pkt_size; 140 140 } 141 141 142 - int gpr_send_pkt(struct apr_device *gdev, struct gpr_pkt *pkt) 142 + int gpr_send_pkt(struct apr_device *gdev, const struct gpr_pkt *pkt) 143 143 { 144 144 return pkt_router_send_svc_pkt(&gdev->svc, pkt); 145 145 } 146 146 EXPORT_SYMBOL_GPL(gpr_send_pkt); 147 147 148 - int gpr_send_port_pkt(gpr_port_t *port, struct gpr_pkt *pkt) 148 + int gpr_send_port_pkt(gpr_port_t *port, const struct gpr_pkt *pkt) 149 149 { 150 150 return pkt_router_send_svc_pkt(port, pkt); 151 151 }
+1 -1
include/linux/remoteproc/mtk_scp.h
··· 58 58 void *priv); 59 59 void scp_ipi_unregister(struct mtk_scp *scp, u32 id); 60 60 61 - int scp_ipi_send(struct mtk_scp *scp, u32 id, void *buf, unsigned int len, 61 + int scp_ipi_send(struct mtk_scp *scp, u32 id, const void *buf, unsigned int len, 62 62 unsigned int wait); 63 63 64 64 unsigned int scp_get_vdec_hw_capa(struct mtk_scp *scp);
+9 -8
include/linux/rpmsg.h
··· 182 182 rpmsg_rx_cb_t cb, void *priv, 183 183 struct rpmsg_channel_info chinfo); 184 184 185 - int rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len); 186 - int rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst); 185 + int rpmsg_send(struct rpmsg_endpoint *ept, const void *data, int len); 186 + int rpmsg_sendto(struct rpmsg_endpoint *ept, const void *data, int len, u32 dst); 187 187 188 - int rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len); 189 - int rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst); 188 + int rpmsg_trysend(struct rpmsg_endpoint *ept, const void *data, int len); 189 + int rpmsg_trysendto(struct rpmsg_endpoint *ept, const void *data, int len, u32 dst); 190 190 191 191 __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp, 192 192 poll_table *wait); ··· 249 249 return NULL; 250 250 } 251 251 252 - static inline int rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len) 252 + static inline int rpmsg_send(struct rpmsg_endpoint *ept, const void *data, int len) 253 253 { 254 254 /* This shouldn't be possible */ 255 255 WARN_ON(1); ··· 257 257 return -ENXIO; 258 258 } 259 259 260 - static inline int rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len, 260 + static inline int rpmsg_sendto(struct rpmsg_endpoint *ept, const void *data, int len, 261 261 u32 dst) 262 262 { 263 263 /* This shouldn't be possible */ ··· 267 267 268 268 } 269 269 270 - static inline int rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len) 270 + static inline int rpmsg_trysend(struct rpmsg_endpoint *ept, const void *data, 271 + int len) 271 272 { 272 273 /* This shouldn't be possible */ 273 274 WARN_ON(1); ··· 276 275 return -ENXIO; 277 276 } 278 277 279 - static inline int rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data, 278 + static inline int rpmsg_trysendto(struct rpmsg_endpoint *ept, const void *data, 280 279 int len, u32 dst) 281 280 { 282 281 /* This shouldn't be possible */
+1 -1
include/linux/rpmsg/mtk_rpmsg.h
··· 25 25 ipi_handler_t handler, void *priv); 26 26 void (*unregister_ipi)(struct platform_device *pdev, u32 id); 27 27 int (*send_ipi)(struct platform_device *pdev, u32 id, 28 - void *buf, unsigned int len, unsigned int wait); 28 + const void *buf, unsigned int len, unsigned int wait); 29 29 int ns_ipi_id; 30 30 }; 31 31
+2 -2
include/linux/soc/qcom/apr.h
··· 191 191 gpr_port_t *gpr_alloc_port(gpr_device_t *gdev, struct device *dev, 192 192 gpr_port_cb cb, void *priv); 193 193 void gpr_free_port(gpr_port_t *port); 194 - int gpr_send_port_pkt(gpr_port_t *port, struct gpr_pkt *pkt); 195 - int gpr_send_pkt(gpr_device_t *gdev, struct gpr_pkt *pkt); 194 + int gpr_send_port_pkt(gpr_port_t *port, const struct gpr_pkt *pkt); 195 + int gpr_send_pkt(gpr_device_t *gdev, const struct gpr_pkt *pkt); 196 196 197 197 #endif /* __QCOM_APR_H_ */
+3 -3
sound/soc/qcom/qdsp6/audioreach.c
··· 579 579 int audioreach_send_cmd_sync(struct device *dev, gpr_device_t *gdev, 580 580 struct gpr_ibasic_rsp_result_t *result, struct mutex *cmd_lock, 581 581 gpr_port_t *port, wait_queue_head_t *cmd_wait, 582 - struct gpr_pkt *pkt, uint32_t rsp_opcode) 582 + const struct gpr_pkt *pkt, uint32_t rsp_opcode) 583 583 { 584 584 585 - struct gpr_hdr *hdr = &pkt->hdr; 585 + const struct gpr_hdr *hdr = &pkt->hdr; 586 586 int rc; 587 587 588 588 mutex_lock(cmd_lock); ··· 622 622 } 623 623 EXPORT_SYMBOL_GPL(audioreach_send_cmd_sync); 624 624 625 - int audioreach_graph_send_cmd_sync(struct q6apm_graph *graph, struct gpr_pkt *pkt, 625 + int audioreach_graph_send_cmd_sync(struct q6apm_graph *graph, const struct gpr_pkt *pkt, 626 626 uint32_t rsp_opcode) 627 627 { 628 628
+2 -2
sound/soc/qcom/qdsp6/audioreach.h
··· 841 841 void audioreach_graph_free_buf(struct q6apm_graph *graph); 842 842 int audioreach_send_cmd_sync(struct device *dev, gpr_device_t *gdev, struct gpr_ibasic_rsp_result_t *result, 843 843 struct mutex *cmd_lock, gpr_port_t *port, wait_queue_head_t *cmd_wait, 844 - struct gpr_pkt *pkt, uint32_t rsp_opcode); 845 - int audioreach_graph_send_cmd_sync(struct q6apm_graph *graph, struct gpr_pkt *pkt, 844 + const struct gpr_pkt *pkt, uint32_t rsp_opcode); 845 + int audioreach_graph_send_cmd_sync(struct q6apm_graph *graph, const struct gpr_pkt *pkt, 846 846 uint32_t rsp_opcode); 847 847 int audioreach_set_media_format(struct q6apm_graph *graph, 848 848 const struct audioreach_module *module,
+2 -1
sound/soc/qcom/qdsp6/q6apm.c
··· 29 29 30 30 static struct q6apm *g_apm; 31 31 32 - int q6apm_send_cmd_sync(struct q6apm *apm, struct gpr_pkt *pkt, uint32_t rsp_opcode) 32 + int q6apm_send_cmd_sync(struct q6apm *apm, const struct gpr_pkt *pkt, 33 + uint32_t rsp_opcode) 33 34 { 34 35 gpr_device_t *gdev = apm->gdev; 35 36
+1 -1
sound/soc/qcom/qdsp6/q6apm.h
··· 142 142 int q6apm_free_fragments(struct q6apm_graph *graph, unsigned int dir); 143 143 int q6apm_unmap_memory_fixed_region(struct device *dev, unsigned int graph_id); 144 144 /* Helpers */ 145 - int q6apm_send_cmd_sync(struct q6apm *apm, struct gpr_pkt *pkt, 145 + int q6apm_send_cmd_sync(struct q6apm *apm, const struct gpr_pkt *pkt, 146 146 uint32_t rsp_opcode); 147 147 148 148 /* Callback for graph specific */