@@ -245,38 +245,38 @@ struct qcom_smem {
245245};
246246
247247static struct smem_private_entry *
248- phdr_to_last_private_entry (struct smem_partition_header * phdr )
248+ phdr_to_last_uncached_entry (struct smem_partition_header * phdr )
249249{
250250 void * p = phdr ;
251251
252252 return p + le32_to_cpu (phdr -> offset_free_uncached );
253253}
254254
255- static void * phdr_to_first_cached_entry (struct smem_partition_header * phdr )
255+ static void * phdr_to_last_cached_entry (struct smem_partition_header * phdr )
256256{
257257 void * p = phdr ;
258258
259259 return p + le32_to_cpu (phdr -> offset_free_cached );
260260}
261261
262262static struct smem_private_entry *
263- phdr_to_first_private_entry (struct smem_partition_header * phdr )
263+ phdr_to_first_uncached_entry (struct smem_partition_header * phdr )
264264{
265265 void * p = phdr ;
266266
267267 return p + sizeof (* phdr );
268268}
269269
270270static struct smem_private_entry *
271- private_entry_next (struct smem_private_entry * e )
271+ uncached_entry_next (struct smem_private_entry * e )
272272{
273273 void * p = e ;
274274
275275 return p + sizeof (* e ) + le16_to_cpu (e -> padding_hdr ) +
276276 le32_to_cpu (e -> size );
277277}
278278
279- static void * entry_to_item (struct smem_private_entry * e )
279+ static void * uncached_entry_to_item (struct smem_private_entry * e )
280280{
281281 void * p = e ;
282282
@@ -300,9 +300,9 @@ static int qcom_smem_alloc_private(struct qcom_smem *smem,
300300 void * cached ;
301301
302302 phdr = smem -> partitions [host ];
303- hdr = phdr_to_first_private_entry (phdr );
304- end = phdr_to_last_private_entry (phdr );
305- cached = phdr_to_first_cached_entry (phdr );
303+ hdr = phdr_to_first_uncached_entry (phdr );
304+ end = phdr_to_last_uncached_entry (phdr );
305+ cached = phdr_to_last_cached_entry (phdr );
306306
307307 while (hdr < end ) {
308308 if (hdr -> canary != SMEM_PRIVATE_CANARY ) {
@@ -315,7 +315,7 @@ static int qcom_smem_alloc_private(struct qcom_smem *smem,
315315 if (le16_to_cpu (hdr -> item ) == item )
316316 return - EEXIST ;
317317
318- hdr = private_entry_next (hdr );
318+ hdr = uncached_entry_next (hdr );
319319 }
320320
321321 /* Check that we don't grow into the cached region */
@@ -460,8 +460,8 @@ static void *qcom_smem_get_private(struct qcom_smem *smem,
460460 struct smem_private_entry * e , * end ;
461461
462462 phdr = smem -> partitions [host ];
463- e = phdr_to_first_private_entry (phdr );
464- end = phdr_to_last_private_entry (phdr );
463+ e = phdr_to_first_uncached_entry (phdr );
464+ end = phdr_to_last_uncached_entry (phdr );
465465
466466 while (e < end ) {
467467 if (e -> canary != SMEM_PRIVATE_CANARY ) {
@@ -476,10 +476,10 @@ static void *qcom_smem_get_private(struct qcom_smem *smem,
476476 * size = le32_to_cpu (e -> size ) -
477477 le16_to_cpu (e -> padding_data );
478478
479- return entry_to_item (e );
479+ return uncached_entry_to_item (e );
480480 }
481481
482- e = private_entry_next (e );
482+ e = uncached_entry_next (e );
483483 }
484484
485485 return ERR_PTR (- ENOENT );
0 commit comments